0

I want to simulate a driving car on a road on an Android device (like on an emulator).

On an emulator, I am loading a kml file, and the emulator reads it and set the next position each second. So I looked if I could do the same programmatically, but what I found doesn't look very good.

I found a KmlLayer and it said that I have to create a layer of the map where all the position will be placed as a marker. And after that I would be able to get those marker positions. The problem is that I only want to get positions from the kml file and set those positions one by one each second to simulate the car moving. And creating a layer of the map, placing all the marker and get the position of each marker isn't a too heavy way do what I want?

Is there any other way to simulate a car moving on a road with specific LatLn on an Android device?

Phantômaxx
  • 37,901
  • 21
  • 84
  • 115
leykan
  • 389
  • 2
  • 4
  • 24
  • 1
    Install this in your device : https://play.google.com/store/apps/details?id=com.lexa.fakegps – Dhruv Patel Jan 10 '18 at 10:07
  • The architecture of your application should provide ways for receiving data from different sources: from GPS, from file, from database etc. Something like [Repository](https://msdn.microsoft.com/en-us/library/ff649690.aspx) pattern. – Andrii Omelchenko Jan 10 '18 at 10:12
  • Possible duplicate https://stackoverflow.com/questions/2279647/how-to-emulate-gps-location-in-the-android-emulator –  Jan 10 '18 at 10:52

0 Answers0