android
android copied to clipboard
HighAccuracyLocationService should implement onTimeout
Starting with API 35 all the foreground service has the implement onTimeout and properly react to this callback. This is important now that Google is enforcing a timeout of 6h https://developer.android.com/about/versions/15/behavior-changes-15#datasync-timeout.
Check https://cs.android.com/androidx/platform/frameworks/support/+/bb8cbc00d4a45560dee41c91fe942bde37e0f3c1:work/work-runtime/src/main/java/androidx/work/impl/foreground/SystemForegroundService.java;l=116 for an implementation that works in multiple API level