Not getting location continously in background through glympse sdk

231 Views Asked by At

I have tried various glympse sdk samples but not getting location updates in background and after killing the app using glympse sdk.

1

There are 1 best solutions below

0
On

Which version of Android are you testing with?

There are new background location limits in Android Oreo. https://developer.android.com/about/versions/oreo/background-location-limits.html

Those limits are handled by Glympse because we put our service in the foreground and attach it to the ongoing notification that you should see when sharing in the background.

Second possible limitation that you're running into is due to Android's Doze functionality. To get around this, on devices running Android 7.1 you should ask your user to exempt the app from being affected by Doze. See https://developer.android.com/training/monitoring-device-state/doze-standby.html#support_for_other_use_cases on how to ask the user to whitelist the application via a system dialog.

If everything seems ok in the foreground and you're testing on a newer deevice, it is likely one of those that you're running into.