How to simulate driving a route in real device

梦想与她 提交于 2019-11-29 23:02:38

I'm using mock locations in the development of my app. The following two apps have proved reliable in mocking locations (static location & routes) thus far:

Lockito

  • I use Lockito to create routes that are snapped to roads. Routes are created within Lockito. After a route has been created, Lockito can then playback the route as a series of mock locations that affect other apps reading GPS location.

  • Speed control is available for playing back routes.

  • Routes can be saved and loaded to be played back another time.

  • https://play.google.com/store/apps/details?id=fr.dvilleneuve.lockito

Teleport

How I Use Lockito and Teleport in Conjunction with my App

I would have either Lockito or Teleport ^ mocking my device's location while my app is running. That is, I would have at lesat 2 apps "running" on my device when mocking locations - my app, and either Lockito or Teleport.

^ I don't use both Lockito and Teleport at the same time for fear of unintended consequences.


Digression:

Ways I create .KML files:

1) http://www.mapmash.in/kmlpolyline.html

2) Google Earth

I needed to test driving journeys with my app, that had inaccuracies and were actually real life scenarios (e.g. tunnels, city driving, intermittent GPS signal) I did this using two apps, one mentioned by davidleejy, and going out for a drive once to gather the data:

GPS Logger - To record the initial journey on the road as a .kml or .gpx

Lockito - To play back the journey.

Try my Fake Location app (free): https://play.google.com/store/apps/details?id=sinhhuynh.map.fakelocation It helps simulate single location and route (path) too.

  1. Allow mock location.
  2. Choose starting point and destination (it gets route from Google maps api).
  3. Set time to simulate the whole route.

The android emulator for Visual Studio that runs with Hyper-visor has a GPS option to follow road and go speed limit (or to go 400 mph, walk, and some other options). However, the latest windows update to fall creator's update winver 1709 seems to have broken the launching of the emulator. Switching to the Android studio emulator with HAXM does not have the "follow road" and "go speed limit" options.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!