I use Ionic in order to create an application.
When I use the following command, the app working in my device :
ionic run android -l
This command start a web server on my computer, this web server will serve the app on device. The app depends on the webserver (so computer and device must be in the same network).
When I use the following command, the app doesn't work :
ionic run android
In fact, the app will display the first screen, but when I click on a button I get a blank screen. I can't use the console system (with -c argument) because without -l argument there is no webserver.
I want to debug my app without webserver.
Do you have any idea ?
I found the solution thanks to GapDebug tool.
I used links like :
<a href="/#/home">
But this link point to no resource. We must remove first /.
So, I change all my links to this format :
<a href="#/home">
I hope it will help.
Related
I have been using Chrome to debug a mobile application that I am working on, but lately I am unable to give commands like console.log('test'), or debug variables, for example: if I typed Array_Person I would get something like
[Object,Object]
>0:Object
>1:Object
And if i expand the object i would get the data inside. Now it doesnt.
Now for some reason every time i try to debug my device application, no matter what i type, it works like i am typing on notepad
It affects only my device debugger, if i try to debug a website it works as usual
What I have already tried:
- Close then open Google Chrome
- Uninstall and reinstall Google Chrome
- Reboot computer
- Recompile the mobile application
I expected to be able to open the details of the Array, as I want to debug the content of an array.
Obs: I am new here, so if my question does not fit this site, do tell me where should i send this question.
I'm new to the Ionic Framework, and I'm doing an app that preserves the user login so it can show a different page when user is logged. And for doing this, I'm saving the user ID into the local storage.
This works fine when I do ionic serve and testing the code on browser, but it doesn't work on my Android device (so I run ionic cordova run android). Why? I have set the Storage right by using IonicStorageModule.forRoot() in app.module.ts -> imports[...]. Here's my code and my Ionic specs:
I just figured out my problem and built a solution. On the very first access in my app userLoggedID is completely empty (it wasn't neither undefined nor null), so I attached a catch() instruction and now the code works fine.
LOG:
I am a junior mobile developer who is working on a location tracking app for android. I want to monitor location of people using android tracking app on web for which I have found this code on github written in Coffee script. I am total noob when it comes to web terminology or tool
I dont know how to show output of this code on web/browser. Can any one give me simple bullets on how to use this code and see output.
Download and install Node.js.
Go to the code Directory, ie.
cd ~/track-my-location-develop/track-location/web
and run the following command: npm install && npm start
After thats done, open the url http://localhost:4000 on your browser
You will get a list of devices available,Get any of those user id and track the device by navigating to : http://localhost:4000/track/:objectId
eg: http://localhost:4000/track/Simulator
Refer to app.coffee file for further details regarding the routes available.
Now you could use these WebServices within your android application to do your desired task.
I recently started working with PhoneGap based on cordova to build an app for ios, android and windows phones.
For now I'm testing it on iphone, which is the main platform for this app and this question as well.
To make it easier, lets call my PhoneGap application "Scanner".
Here's what I'm trying to achieve:
You're in a random app, lets say the mail app. Click on an attachement and select "Open with..." Scanner. That should send the file to the scanner and send the path of that file to a javascript variable.
For now, I had no problem opening the xcode build and adding the document type, so my app is displayed in the open with menu.
Any idea how to get the app to display a file ? A pdf for example ?
If there's a global solution for the 3 platforms, that would be like heaven...
Thanks to all of you !
What you need is called "deep linking"
some plugins.
https://github.com/nordnet/cordova-universal-links-plugin
Happy codding!
******************* Edit *******************
I see your need, you are talking about Uniform Type Identifiers, but I dont find any information about how to use in cordova. Probably you will need to write your own plugin
https://developer.apple.com/library/ios/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html#//apple_ref/doc/uid/TP40001319
I am a developer of DisciplineXgames! We are developing a mobile app. We have downloaded the Cordova test suite from here (https://github.com/apache/cordova-mobile-spec). When I upload this on DisciplineXgames server it shows an error in alert box "Error: Apache Cordova did not initialize. Demo will not run correctly." but when we upload the same folder on Phonegap server it works perfectly fine. Unfortunately this doesn't solve our problem as we are building our mobile app on our server and just using Phonegap to redirect the user to the page hosted on DisciplineXgames server if there's Internet in the user's mobile.
First error which I got in the console area in Google Chrome is cordova.js missing when I provided that than it outputs another error that is cordova/channel is required.
Hope you can guide us through how we can use Cordova's amazing features on our server instead of Phonegap's local server.
I am a bit confused as to what you are trying to accomplish here but I am going to take a stab.
You want to develop an app that when the app launches, it checks to see if the device has internet connectivity. If it does, then the app just opens the mobile website hosted on your servers. if there is no internet connectivity then the app ???
Since this is a very simple use case for an app, I would avoid using cordova and instead use PhoneGap Build. Simply write an index.html page and a .js file to check for the connectivity and then use the inappbrowser plugin to open your mobile site if there is connectivity. Once that is done, zip your package, upload to phonegap build and then download your compiled apps.
phoneGap Build allows you to avoid the app building overhead and the need to install things BUT prevents you from taking advantage of some of the deeper configurations and some plugins. But again, for your simple use case, PhoneGap Build sounds like the way to go.