Closed ecgreb closed 8 years ago
These changes are great. We might want to update the mock-locations-routes.md instructions to add your new script. Maybe something like:
# Install GPX File
To install your gpx file onto your device, run the install script included in this repo:
install-gpx-trace.sh <trace file> <package name>
Example:
install-gpx-trace.sh lost.gpx com.example.myapp
@sarahlensing good call. Updated docs to include gpx install script.
https://github.com/mapzen/lost/pull/127/commits/577396a5cbb659cd30a088eee3c8c7ee2fb1586e
Overview
Proposed Changes
Refactors mock GPX trace logic so it can be tested synchronously. Cleans up classes and adds interfaces to facilitate testing.
Updates sample app to load a mock GPX trace from its external files directory. Previously the trace file was loaded from the root of the SD card which now fails due to insufficient permissions.
This is cleaner than adding the required permissions for accessing all of external storage and is the now the recommended way for developers to use mock traces in a runtime permissions world.
Also adds
fastestInterval
to sample app location request since this is required for mock trace replay to work correctly (background thread sleeps forfastestInterval
between each location update).Adds utility script
install-gpx-trace.sh
to make it easier to copy a GPX trace file into an application's external files directory on an emulator or device.Fixes #84