3

I'm playing around with Phone Gap and an Android Emulator. Is there away to test the GPS within the emulator? Obviously the emulator doesn't have a GPS, but is there a debug mode or something?

Every time I test it, the GPS 'onDeviceReady' just goes straight to the 'onError' function.

A way around this?

Thanks.

Oliver Jones
  • 1,420
  • 7
  • 27
  • 43
  • This was already answered at [How to emulate GPS location in the Android Emulator?][1] [1]: http://stackoverflow.com/questions/2279647/how-to-emulate-gps-location-in-the-android-emulator – Grmn Apr 05 '13 at 05:20

2 Answers2

5

Within Android emulator, you could try using ddms.

developer.android.com/tools/debugging/ddms.html


For debugging phonegap application outside the emulator, PhoneGap Emulation / Ripple allow you to test in desktop browser.

http://emulate.phonegap.com/ "PhoneGap Emulation powered by Ripple"

Click the setting gears and check "Override Geolocation".


Weinre (WEb INspector REmote) enables you to test the web application remotely.

debug.phonegap.com/

people.apache.org/~pmuellr/weinre/docs/latest/

Ivan Chau
  • 1,403
  • 1
  • 18
  • 28
3

If you using Eclipse you can go to "window->open pespective->ddms". Then you go to Emulator Control tab. There is a "Location Control" and you can send a location.

Scoup
  • 1,323
  • 8
  • 11