I have a GPS navigation application for Android 2.3.3 which I have been working on. I am currently trying to simulate locations via a GPX file through DDMS. While this works perfectly find on the android emulator, I am unable to get it working on an actual device.
I am able to see the device on the under the “Devices” tab, but I am unable to send any mock location data, or GPX data as the options are under “Emulation Control” tab are grayed out.
I have noticed that previous questions on StackOverflow mention that it is not possible, however the Google docs titled “Using DDMS” – http://developer.android.com/tools/debugging/ddms.html state the following (at the bottom of the page)
Setting the location of the phone
If your application depends on the location of the phone, you can have
DDMS send your device or AVD a mock location. This is useful if you
want to test different aspects of your application’s location specific
features without physically moving. The following geolocation data
types are available to you:
I am just wondering how to send fake location data to a device via DDMS.
Thank you for your help in advance, and I really appreciate it.
Bilzac, your understanding is correct. Simply put, Android’s documentation is misleading. Many developers have been confused by this. You cannot load a gpx file and send to device like you do on the emulator contrary to what the documentation suggests.