Configuring the App
Your server can change the app's settings when it replies to a request, and you can set up the app for someone by sending them a link.
Configuration by server response
You can configure all of the settings in the app by having your server return new settings in the JSON response when it uploads data. The JSON structure and all possible config values are below.
{
"result": "ok",
"set": {
"send_interval": "1s|5s|10s|15s|30s|1m|2m|5m|10m|30m|off",
"send_wifi_only": true|false,
"trip_mode": "walk|run|hike|bicycle|ebike|scooter|skate|ski|snowboard|sleigh|car|taxi|bus|tram|metro|train|monorail|gondola|funicular|boat|plane|<a mode's server value or ID>",
"main": {
"tracking_mode": "off|standard|significant|both",
"visit_tracking": true|false,
"desired_accuracy": "nav|best|10m|100m|1km|3km",
"activity_type": "other|car|fitness|nav|air|boat",
"background_indicator": true|false,
"pause_automatically": true|false,
"logging_mode": "all|latest|owntracks",
"batch_size": 50|100|200|500|1000,
"resume_with_geofence": "off|100m|200m|500m|1km|2km",
"min_distance": "off|1m|10m|50m|100m|500m",
"min_time": "1s|5s|10s|30s|1m|5m",
"max_accuracy": <meters>|"off",
"auto_stop_radius": <meters>|"off",
"auto_stop_time": <seconds>,
"discard_without_gps": true|false,
"discard_stationary": true|false,
},
"trip": {
"desired_accuracy": "nav|best|10m|100m|1km|3km",
"activity_type": "other|car|fitness|nav|air|boat",
"background_indicator": true|false,
"prevent_screen_lock": true|false,
"ask_to_end_when_stopped": true|false,
"logging_mode": "all|latest|owntracks",
"batch_size": 50|100|200|500|1000,
"min_distance": "off|1m|10m|50m|100m|500m",
"min_time": "1s|5s|10s|30s|1m|5m",
"max_accuracy": <meters>|"off",
"auto_stop_radius": <meters>|"off",
"auto_stop_time": <seconds>,
"discard_without_gps": true|false,
"discard_stationary": true|false,
}
}
}
Note that most values are strings, with the exception of some that are numbers or boolean.
The settings under main correspond to the settings in the main settings screen in the UI, and the settings under trip correspond to the settings when a trip is in progress.
Important: It is very possible to send a setting to the phone that will disable logging completely, which creates a dead end, since the phone will then never check back with the server for updated settings! The main setting that can cause this to happen is send_interval=off. Similarly, with send_wifi_only=true the phone only checks in while it's on Wi-Fi. Setting tracking_mode=off means only "visits" will be tracked, which will be received extremely infrequently, so you won't have a chance to change the setting to something else until after the phone checks in after that.
It is best to only send properties in the response that you want to change at that moment, rather than always sending the values on every response. Treat it like pressing the button in the UI, only send the response when you want to press the button.
Configuration by custom URL
You can send people a custom URL that will configure the app by clicking on it. Create a URL with your endpoint, token and device ID like the following:
overland://setup?url=https%3A%2F%2Fexample.com%2Fapi&token=1234&device_id=1&unique_id=yes
Tapping that URL on a device with the app installed will launch the app and save the values in the configuration. This is a quick way to configure many devices since it bypasses the need to enter the values in the settings screen.
Query parameters:
url- The server URL to post data to
token- The access token to use in requests
device_id- Set the user-defined device ID here
unique_id=yes- Set this to
yesto toggle the "Unique ID" setting