-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't work on Android 8 (Oreo) #97
Comments
Which is a non-free alternative where the cheapest variant costs you $349. I guess that other free solutions will pop up soon, since this seems to be a rather new problem. |
I apologize for the late comment. I currently don't have time to look into this, but from the document, it seems like what i'm dong should make this act like a foreground app still.
PR's are welcome. |
Any idea here? |
I was forced to upgrade my cordova toolset and as a knock-on effect have ended up with Android 8/API 26. When you dim the screen while your app is running, background updates continue. But when you flick to another app background updates stop instantly. You will also observe that at that point the location marker disappears from your phone's status bar. I believe that Android API 26 will be a minimum requirement in Google Play Store next month, so reverting back is not a solution. It seems the only way forward is to cop it on the chin and program something around startForegroundService() |
Facing the same problem. I am not an Android developer, so I can't propose a PR, but I found this to enable foreground services in the meantime: |
I've tested this plugin on a Nexus 6P running Android 8.0 and it fails to receive location updates while in the background.
Android 8 adds strict Background Location Limits which limits the update interval of the Fused Location Provider API to "only a few times each hour".
FWIW cordova-background-geolocation-lt does work fine on Android 8 with the foreground service option enabled.
The text was updated successfully, but these errors were encountered: