• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Unable to simulate GPS track with the Emulator

I am having issues trying to debug an GPS application as I cannot get a mock GPS signal working within the emulator.

I have tried loading GPX and KML files, to no avail. These have been created by either online apps converting nmea files or saving the KMX file in Google Earth and converting to KML.

I attempted to push a KML file to the emulator in the /data/misc/location/gps location, but the emulator would not turn off hanging on shutdown. When I restarted it the file and the location directory, which I had to create, did not exist.

How can I get a GPS stream emulated so I can track down an annoying little bug?

Many Thanks,

Paul.
 
I'd love to debug this on a real device, but I need to emulate the device moving. Unless I take the laptop onto the train or something.

Basically I have an activity that works fine and I get the Unit's speed, but if the screen rotates I no longer get the speed. The locationchanged event is still fired as the distance is calculated correctly, just the speed stops.

I have another activity with a google maps display on it, with an overlayed speed textbox, this one works fine.

It has the same code to create the locationchanged event, just has a time param of 10 seconds instead of the 1 sec of the activity does not work.

I've tried several example of the net, but nothing seems to work.

Cheers

Paul
 
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones