Stravomatic is an app that uses Android phones’ sensors to determine when you start running or bicycling, and triggers a Strava activity automatically.
Stravomatic is free software, released under the GPLv3 or later. You can git clone it, build it, modify it from https://github.com/colinleroy/stravomatic
Here is a little FAQ on how it works and how to make it work best for you.
Will Stravomatic drain my battery ?
Stravomatic doesn’t use the GPS. It only uses Google Play Services’ API to request updates on the user’s activity (still, walking, running, bicycling, on vehicle). This API uses the phone’s accelerometers and doesn’t use a lot of battery. You will be able to track the extra battery use by looking at your phone’s battery usage: it will be accounted for in the “Google Play Services” application, as it is this API that uses battery.
Stravomatic triggers Strava with a long delay and Strava loses the beginning of my ride
You can change a few Stravomatic parameters to make it trigger Strava more quickly:
- Lower “Detection interval”. Stravomatic asks the phone for updates at this interval. If it is set to 2 minutes, for example, and you’re unlucky, you could lose up to one minute and 59 seconds of your activity.
- Lower “Detection threshold”. Google Play Services gives Stravomatic the current user activity along with a certainty percentage, as in “I think the user is bicycling, and I’m 67% sure of it”. Stravomatic will not trigger Strava until the certainty percentage is above the detection threshold.
- Whitelist Stravomatic and Strava to avoid battery optimisation. Android, by default, puts apps in standby, and this prevents Stravomatic from getting the information about activity start quickly enough. You can disable battery optimisation for Stravomatic by going to Settings and then Battery.
- On the MIUI platform, there’s another place where this has to be disabled: Settings, Battery and performance, Manage apps battery usage, and set Stravomatic (and Strava) power saving mode to “Off”.
Stravomatic doesn’t detect my activity at all
- Lower “Detection threshold”. As the activity detection is based on the phone’s movements, it is more or less reliable, depending on your hardware and on the place your phone is in. For bicycling, the best detection is achieved when the phone is in your pants pocket. It is a bit longer when the phone is in your jacket pocket or on the handlebars, and even longer when the phone is in a jacket’s top pocket or a backpack.
Stravomatic triggers a Strava activity when I’m in my car or in a train
- Increase “detection threshold”, by the minimum required until you don’t get false positives, keeping it as low as possible to lose the least possible activity before Strava starts.
Stravomatic triggers more than one Strava activity
- Increase “Stop activity timeout” : if you stop during the activity – at a red light for example, for longer than this timeout, Stravomatic will ask Strava to stop the activity. It will then trigger a new activity when you move again.
- Lower “Detection threshold” : If Google Play Services is not very sure that you’re running/bicycling, the certainty percentage could go below the configured threshold in some circumstances, and Stravomatic will consider that you’ve stopped your activity.
Stravomatic uses too much battery
- Increase “Detection interval” so that updates are requested less frequently. You may lose a bit more of your activities’ start.
Stravomatic triggers Strava, but Strava doesn’t record the activity
- Strava, unlike Stravomatic, needs the GPS signal to be acquired in order to record your activity. Verify that Strava has the Android permission to use GPS. You can also experiment with your phone’s “Location” settings, for example by setting it to “High accuracy” mode.
- On MIUI and Android 10, you have to allow Strava access to GPS when in background.
- On Android 10, you have to grant Stravomatic the Overlay permission. This does not make a lot of sense, but it is one of the few exceptions to a new restriction that prevents apps in the background to start activities without user interaction.
What are your settings ?
- Personally, the best results I get is with a detection interval of 30 seconds, a stop timeout of 5 minutes, a 75% detection threshold, and my phone’s location settings to “high accuracy”. With these settings, Strava starts recording my bike rides 50 to 300 meters after I start.