An application for easy mocking of locations via a GPX file.
After installation set this app in device developer options to be the mock location app.
The app mocks locations via a track file in GPX format.
Each <trkpt>
must have:
lat
andlon
attributes- a
<time>
element with the value in formatyyyy-MM-ddTHH:mm:ssZ
oryyyy-MM-ddTHH:mm:ss.SSSZ
,
and optionally:
<ele>
elements for elevation. e.g.<ele>105.32</ele>
<speed>
elements for speed in m/s. e.g.<speed>2.5</speed>
<accuracy>
elements for accuracy in meters. e.g.<accuracy>7.41</accuracy>
An example GPX track file can be found here: mock_track.gpx
GPX track files must be put on the device here:
/sdcard/Mocks/
The app should be granted read external storage and location permissions. Mock route can be started from the app UI by tapping on "RUN MOCK ROUTE" and chosing the GPX file via the File Picker UI. Location mocking can be stopped by tapping "CLEAR MOCK ROUTE".