[Android] Fix bug in onProviderChange event: not properly detecting when location-services disabled.
[Android] Android 12: Guard Context.startForegroundService with try / catch: the plugin will now catch exception ForegroundServiceStartNotAllowedException and automatically retry with an AlarmManageroneShot event.
[Android] Android 12: Refactor foreground-service management for Android 12: A way has been found to restore the traditional behaviour of foreground-services, allowing them to stop when no longer required (eg: where the plugin is in the stationary state).
[Android] Refactor application life-cycle management. Remove deprecated permission android.permission.GET_TASKS traditionally used for detecting when the app has been terminated. The new life-cycle mgmt system can detect Android headless-mode in a much more elegant manner.
[Android] Better handling for WhenInUse behaviour: The plugin will not allow .changePace(true) to be executed when the app is in the background (since Android forbids location-services to initiated in the background with WhenInUse).
[Android] Refactor useSignificantChangesOnly behaviour. Will use a default motionTriggerDelay with minimum 60000ms, minimum distanceFilter: 250 and enforced stopTimeout: 20.
[iOS] iOS 15 has finally implemented Mock Location Detection. location.mock will now be present for iOS when the location is mocked, just like Android.
4.8.0 — 2022-06-21
onProviderChange
event: not properly detecting when location-services disabled.Context.startForegroundService
withtry / catch
: the plugin will now catch exceptionForegroundServiceStartNotAllowedException
and automatically retry with anAlarmManager
oneShot event.android.permission.GET_TASKS
traditionally used for detecting when the app has been terminated. The new life-cycle mgmt system can detect Android headless-mode in a much more elegant manner.WhenInUse
behaviour: The plugin will not allow.changePace(true)
to be executed when the app is in the background (since Android forbids location-services to initiated in the background withWhenInUse
).useSignificantChangesOnly
behaviour. Will use a defaultmotionTriggerDelay
with minimum 60000ms, minimumdistanceFilter: 250
and enforcedstopTimeout: 20
.location.mock
will now be present for iOS when the location is mocked, just like Android.