runnerup icon indicating copy to clipboard operation
runnerup copied to clipboard

Lost tracking

Open GormCh opened this issue 5 years ago • 4 comments

Hi folks! I run into issues that seem to be related to lost gps track. I'm not sure about that. It has happened during the last week. Today I set the gps to allow RunnerUp to be constantly connected to gps, i.e. not only when the app is in use. It worked today.

I went into settings to go through it to see if there was anything I had done to cause it and run into error message.

The path to the error message: Settings - Recording. Scroll upwards to reach the last line. RunnerUp closed. I repeated Settings Recording and scroll to the last line. RunnerUp closed and popped up the error message.

Regards Erik Lennartsson RunnerUp_issue_2020-02-20.zip

GormCh avatar Feb 20 '20 16:02 GormCh

To debug crashes you either need a a Play application and let the app send crashes (current releases are not yet in Play and I do not have access anyway) or to connect the phone to a PC with adb just after it occurs.

A common problem to loose recording is that the phone kills applications to save battery. A page about that: https://dontkillmyapp.com/ However, in this case the recording seem to resume, so I do not think it is that. It seems like the phone has gone sleeping, but I have no explanation. A logcat is hard to get, you have to plug in directly after detecting...

The last part I could recreate on one phone. The crash is when reaching the Algorithm part, an array is reported as empty. I cannot explain it now. It is not related to the recording problem. Export database in settings, clear app data, reimport database (and manually adjust settings again) could fix it. I do not want to do that on the phone where I could recreate it, to test some solution instead.

gerhardol avatar Feb 20 '20 22:02 gerhardol

Hi. Should have added some tech facts Phone: Google Pixel 2 OS: Android 10, level 5. No limitations for the app using battery in the background Battery save: Disabled Smart Battery: Off

I will experiment and report.

Erik

GormCh avatar Feb 20 '20 23:02 GormCh

Hi folks! I've done some tests and now know what's causing it. Android 10 App three app level Location Permissions. Allow all the time Allow only while using the app Deny.

I am pretty sure that I've always used the alternative Allow only while using the app but I'm not sure. However that option is the culprit. It is repeatable.

Android 10, security level 5, patch 2002-02-05 The files 0158 and 0159 are generated by RunnerUp version 2.0.2.1. The files 0160 and 0161 are generated by RunnerUp version 2.0.4.0

So, Location Permission must be set on Allow all the time.

Best regards. Erik Lennartsson

RunnerUp_0158-0161.zip

GormCh avatar Mar 03 '20 20:03 GormCh

The app permission ACCESS_BACKGROUND_LOCATION should be set automatically according to the documentation: https://developer.android.com/about/versions/10/privacy/changes RU targets Android 9.

However, you can change this setting manually and doing so will disable GPS when the app goes to sleep (even if it is in the foreground before the screen is off).

It should be possible to check that background access is requested, but that seem to require targeting Android 10. This requires some boring rewrites. For Wear that is quite some changes and I do not have anything to test on. Neither for the phone app, but the emulator is probably OK.

https://developer.android.com/training/location/request-updates#inform-user-background-location-requirement

gerhardol avatar Mar 03 '20 22:03 gerhardol