I've asked this question before but still no resolution. Here is what I'm looking for. I am working on a GPS Navigation application on Android. For that I would like to be able to simulate driving on a map. I read that I can achieve it using a GPX file and using the Android emulator. So I added GPS support to an emulator and launched it. Then I created a GPX file using two different sites:
wtracks.appspot.com: The gpx file I created using it, after loading it in DDMS, nothing happens. That is, I don't even see the file being loaded so the play button is grayed out
Mapmyride.com: The GPX file I created using this do get loaded in DDMS and shows the 835 points in the point count in the emulator window. The green play button is enabled but when I select it, it shows the pause button for a second and then goes back to the green play button. That is, it's almost like the file runs for a second and stops.
So really, all I want is if someone can show me the exact steps to be able to create a GPX file by some easy method like clicking on a map and then once I have a valid GPX file, to be able to load it in DDMS and run it to simulate car driving on a map. If it works, I will accept the answer immediately.
Thanks,
-Vivek
In order to emulate driving your trackpoints and waypoints within the gpx file you will need to manually add the time parameter to each one. Each time parameter should increase second by second.
Here is a gpx file example: (Note: Use the first three lines if your gpx file is incompatible)
GPX file example:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<gpx xmlns="http://www.topografix.com/GPX/1/1" creator="MapSource 6.16.1" version="1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-
instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
<trk>
<name>emulate</name>
<trkseg>
<trkpt lat="-33.91015" lon="151.16772"><ele>0.000000</ele><time>2014-03-05T20:00:01Z</time></trkpt>
<trkpt lat="-33.91014" lon="151.16770"><ele>0.000000</ele><time>2014-03-05T20:00:02Z</time></trkpt>
<trkpt lat="-33.90998" lon="151.16752"><ele>0.000000</ele><time>2014-03-05T20:00:03Z</time></trkpt>
<trkpt lat="-33.90998" lon="151.16752"><ele>0.000000</ele><time>2014-03-05T20:00:04Z</time></trkpt>
<trkpt lat="-33.90982" lon="151.16732"><ele>0.000000</ele><time>2014-03-05T20:00:05Z</time></trkpt>
<trkpt lat="-33.90982" lon="151.16732"><ele>0.000000</ele><time>2014-03-05T20:00:06Z</time></trkpt>
<trkpt lat="-33.90962" lon="151.16709"><ele>0.000000</ele><time>2014-03-05T20:00:07Z</time></trkpt>
<trkpt lat="-33.90962" lon="151.16709"><ele>0.000000</ele><time>2014-03-05T20:00:08Z</time></trkpt>
<trkpt lat="-33.90939" lon="151.16681"><ele>0.000000</ele><time>2014-03-05T20:00:09Z</time></trkpt>
<trkpt lat="-33.90939" lon="151.16681"><ele>0.000000</ele><time>2014-03-05T20:00:10Z</time></trkpt>
<trkpt lat="-33.90916" lon="151.16654"><ele>0.000000</ele><time>2014-03-05T20:00:11Z</time></trkpt>
<trkpt lat="-33.90916" lon="151.16654"><ele>0.000000</ele><time>2014-03-05T20:00:12Z</time></trkpt>
</trkseg>
</trk>
</gpx>
Notice I am increasing the seconds in the time from 20:00:01 up to 20:00:12