Why does GeoCoach stop recording prematurely?

Why does GeoCoach stop recording prematurely?

Apr 25 2017

There are a number of reasons why GeoCoach may be closed on some devices while you are recording an activity. This article should help you troubleshoot and resolve the issue.

1) There are a number of android devices available that ship with modified versions of the stock android operating system. Device manufacturers my choose to modify the android operating system for a number of reasons, but in doing so these modified operating systems no longer operate in the same way Google intended them to. The same applies to rooted devices with custom roms.

Whilst this may offer a number of benefits from the manufacturer/user perspective, it can be very difficult for app developer to cater for operating systems that are not supported by Google and have not been documented by the manufacturer or developer.

I have encountered a number of devices with modified operating systems which prevent GeoCoach from operating correctly without making some changes in the device's settings. 

As device manufacturers / developers tend not to formally document the modifications they have made, it is impossible to cover the ever changing list of impacted devices here. However it is possible  to explain how GeoCoach works and what to look for in a modified operating system to work around any modifications that could be restricting the operation of GeoCoach.

The stock android operating system has the ability to close apps when a device is running low on resources. This keeps the device running smoothly and prevents unnecessary battery drain. However, for an app like GeoCoach, where you want your the app to continue running while you are recording an activity, we need to structure the app in such a way to prevent the operating system from closing the app prematurely.

To do this GeoCoach is split into 2 parts: A user interface and a background service.

The background service runs while you are recording an activity, periodically fetching your GPS position and storing it in GeoCoach's database. The background service operates independently of the user interface which means if the operating system closes the user interface while your screen is off, your recording continues in the background until you open your device (At which point the operating system will open the user interface again) and you can then choose to stop the recording.

However, modified operating systems may also close the background service.  This means while you device's screen is off, GeoCoach will not be able to record your location in it's database.

To prevent background services from being stopped in these modified operating systems, the device manufacturer usual provides options in the device settings to 'whitelist' an app. This lets the operating system know you want an app's background services to continue running in the way Google intended them to. Below is an example of how to whitelist an app on Xiaomi's Redmi.

Where I know a device manufacturer to use a modified Android OS (Such as OxygenOS, HydrogenOS or CyanogenMod, ColorOS), GeoCoach will show the warning below on first launch.

 

I have encountered the use of modified operating systems across Xiaomi, Oneplus, Nubia, Oppo, Vivo, Tommy and Lenovo devices, however there may be many more. If you are aware of any other devices that suffer from similar issues please leave a comment.

2) Many newer android devices now include battery optimisation settings which are designed to close apps running on your device which are considered to be using too much power. 

An example of this can be seen on Samsung devices running android 6 or later. If you navigate to 'Settings', 'Device Maintenance', 'Battery' then scroll to the bottom of the screen you are presented with 'Unmonitored Apps'.

In the 'Unmonitored Apps' setting screen you can then add apps that you want to be ignored by the battery optimisation settings.

Total: 0 Comment(s)

Can't find what you are looking for?

If there is a support topic you need help with and you can't find the answers you need here, then please email us via the link at the bottom of this page.


GeoCoach GPS sports tracker