How do I Mock GPS route in 2018?

178 views
Skip to first unread message

Ivan Penchev

unread,
Oct 8, 2018, 6:44:08 PM10/8/18
to android-platform
Cross-posting from: https://stackoverflow.com/questions/52662089/how-do-i-mock-gps-route-in-2018

This question is a two fold one i.e. it will be of two parts.

We are developing an traffic event app, where based on event X, driver Y gets information. Quick example, McDonalds pays us to send a discount code for free coffee to all drivers that pass their restaurants between 4-6 in the morning if they are driving under the speed limit.

As one can imagine, being able to test this without going for a ride to the nearest McDonalds is a great 'feature' for out developers.

What we used so far is an app called Lockito. This app had 3 basic features.

  1. Being able to define a route between A and B
  2. Being able to save this route for future use
  3. Being able to simulate your location moving on the route with predefined speed.

Question part 1:

Have Google updated their terms and conditions on Google play store? Basically the Lockito App located here was deleted, I was wondering why? Has something in Android Pie's SDK forbid developers from mocking gps routes?

Question part 2:

In 2018, if I as a Android developer, need to fulfill the 3 basic features described above for GPS route mocking, what app/simulator/inbuild tool do I need to use?

Now I have stackoverflow-ed this question and there is basically no recent answer to it. As the latest being from 2015. I found 2 directions of how to tackle the problem:

  1. Use an app from Play Store -- I cant find one that works paid or free one
  2. Use KML format to simulate GPS location routes in Android emulator -- KML doesnt support defining speed

So what do other developers do?

j.ma...@logicom-europe.com

unread,
Oct 9, 2018, 8:37:58 AM10/9/18
to android-platform
Not an GPS expert but have you tried to find a GPS recorder and play the recording (in KML) into the Android Emulator ?
This way you wouldn't need to generate fake path and take actual recording instead.

Also, usually speed is calculated between two points (hence why KML does not handle speed I guess).

Hope someone will be able to provide you with a better answer.
Reply all
Reply to author
Forward
0 new messages