WhereYouGo icon indicating copy to clipboard operation
WhereYouGo copied to clipboard

WhereYouGo not running in background on Android 8.0

Open kurly1 opened this issue 7 years ago • 1 comments

Hi every one

Recently I wanted to play the cartridge “Bergsteigen” (3d1080c3-c3f3-4df7-b96c-0f4f2aebe343) but it didn’t work as expected in the WhereYouGo player.

Future analyses showed two problems occurring if the WhereYouGo player is running on Android 8.0.

  1. If the phone gets locked, the app only gets only randomly some CPU time. So it can happen that the cartridge only gets called every few minutes what for some cartridge might not be enough. Here it would help if the WhereYouGo player offers an option to make a WakeLock (https://developer.android.com/reference/android/os/PowerManager.WakeLock) call to the android API.

  2. After installing a Wake Lock app on my phone the WhereYouGo player was working even if the phone was locked. But the mentioned cartridge still didn’t behave the way it should. I recognised that if the phone was locked the WhereYouGo player signalled several times an hour a GPS fix. This brought me to the following URL: https://developer.android.com/about/versions/oreo/background-location-limits. Means that the WhereYouGo app is considered as a background app if the phone gets locked and only can get a few location updates an hour. It would be good if one of the mentioned functionality would be implemented to make the app even if the phone is locked recognised as a foreground app.

I think, those two issues could get to a real issue for the app as soon as Android 8.0 is more widely used.

Thanks Chris

kurly1 avatar May 21 '18 10:05 kurly1

I'm currently working on this two issues.

Code for 1. issue: https://github.com/kurly1/WhereYouGo/tree/run_if_screen_off Code for 2. issue: https://github.com/kurly1/WhereYouGo/tree/GPS_fix_for_android_8

kurly1 avatar May 30 '18 19:05 kurly1