Android Emulator does not view my index.html with PhoneGap - android

I am trying to run the sample (or any) application with phonegap in android emulator. I followed all the instructions in the PhoneGap's manual, but instead of the contents of index.html, an ordinary android activity starts. I am using phonegap version 1-2-0 and android emulator with target api 8 (android 2.2). What am I doing wrong? Thanks.

This is very hard to answer without some more info. I have managed to get phonegap running on the emulator and my phone fairly recently so it works.
Have you tried MDS applaud ? (It's a plugin for eclipse.)
http://www.mobiledevelopersolutions.com/home/start

Related

Ionic template cache doesn't work on device, only in browser

I implemented gulp-angular-templatecache-ionic to my Ionic app, which made my application run significantly faster in my desktop chrome browser, but when I build and deploy (ionic run android) this application to my device (LG Nexus 5x) it is still slow, it looks like nothing has changed, as if the built android version does not use the angular template cache.
I followed this article: http://tombuyse.com/improving-the-performance-of-your-ionic-application/
Any ideas or suggestions how to debug?
Thanks!
In order to debug your WebView app please follow this guide from google
https://developer.chrome.com/devtools/docs/remote-debugging
If your android version is less than 4.4, then you cannot debug through the chrome devtools.
you can instead run an emulator via the adb emulator, you'll need the android sdk and the adb tool.
read more here: https://developer.android.com/studio/run/emulator.html
The default android emulator/simulator is slow, and also need the HAXM accelerator, you can download the Genymotion simulator which is a replacement for the default android emulators, and run faster, also doesn't need to change anything in your hardware configuration
https://www.genymotion.com/

How does Ionic decide which Android emulator to launch?

I am following this for Android platform: http://ionicframework.com/getting-started/ (cmd> ionic emulate android) . It builds ok, and I know the apk works on a phone, but I want to figure out how does it decided which Android Virtual Device to launch. At the moment, it start up a v2.2 emulator by default and then complains it's too old while trying to install the apk. I want to use v4.1 or higher (I have the relevant SDKs installed through previous native Android development using Eclipse.)
From the command line, just specify the emulator target.
e.g. ionic emulate android --target="Nexus_6P_API_25"
Check the AVD manager for a list of available and installed virtual devices.
Kind of found an answer myself. Instead of using Google Android emulator, one can use
Genymotion. And use can set the device screen size and Android version.

How to test Phonegap applications in Eclipse ADT bundle

I have Download the Eclipse ADT Bundle and i am able to Launch the Eclipse and Can see the Option to develop Android Application.Now as I want to Develop PhoneGap Application so have Downloaded that too.Now through the Command Promt i have created a phonegap application Directory successfully.After this i Opened this PhoneGap application Directory folder into the Eclipse .Till here everything is fine . As this is Hello World Application it is working fine in the emulator and I can see the output but as it is very slow and as i do not have any mobile device to connect to the IDE and test the application i googled out and got to know about the Chrome Ripple Which i have installed as Extension in my Chrome Browser.Chrome Ripple is a debugging tool in which we can see the output very fast on the browser itself, no need of any Emulator or Physical Device .
But the problem is that we need to have a localhost server installed into the Eclipse IDE to run the PhoneGap HTML5 pages into a localhost server and then test it on Ripple but i am not seeing any way to add Any server in this eclipse version ..
Please help me how can i add any localhost server into this Eclipse ADT Bundle to test PhoneGap application..
Thanks..
If you have KitKat 4.4+ it is a lot easier to use chrome for debug.
Type un chrome:
chrome://inspect
You can connect to you mobile and inspect html structure and debug without any server.
Other way is to add browser platform in Cordova that is available from last version (4.0). It is intended for debug into browser similar way as ripple mocking all plugins.

How to run Android project?

I'm new to Android programming. I have installed Android SDK and the Android Studio IDE. I have started by reading this. I copied this code in eclipse and then run my code as Android application. The problem is that when the emulator appears I can't unlock the phone! Also it is too slow and I can't do anything. What are the other options to run Android app?
If you run Windows or Mac and your hardware is not enough to use emulator, you may check BlueStacks (http://www.bluestacks.com). It's like a Android player for PC.

Android Browser

I am building a website which needs to be views on the Android browser as well.
I heard that on the android browser the javascript seems to be breaking. I do not have an android device to view it for myself.
Are there an emulators for the android browser that I can download and check for myself.
My Dev Env: MAC (Lion).
In order to use the emulator you need to have the android sdk installed: instructions here. Then you can look at using the Android emulator docs by Google: here
Another option is to run your own VM of android using parrallels, vmware, etc. The information for that and downloads can be found here

Categories

Resources