O'Reilly logo

PhoneGap Mobile Application Development Cookbook by Matt Gifford

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Controlling your Android Virtual Device

Depending on the functionality included in your Cordova application, if you are testing on an Android Virtual Device, you may wish to make sure that your application successfully picks up changes to the network or the battery level of the device, for example.

How to do it...

In this recipe, we will access the Android Virtual Device using the command line to manipulate and change the settings to allow us to test effectively:

  1. With your application running on an Android Virtual Device, look at the top title bar of the emulator to see what port it is running on, in this case, it is port 5554, as shown in the following screenshot:
  2. Open up your command line tool, or the Terminal if you are working on an OS X machine, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required