[Android] If on device reboot location-services fails to provide a location (eg: timeout, airplane mode), the plugin would rely on motion API events to try again. This is a problem if the motion api is disabled. Instead, the SDK will keep trying to retrieve a location.
[Android] Android 12 support for ForegroundServiceStartNotAllowedException: immediately launch the SDK's TrackingService as soon as .start() executes. If a location-timeout occurs while fetching the onMotionChange position after device reboot with startOnBoot: true, the ForegroundServiceStartNotAllowedException could be raised.
[Android] Add two new attributes android:enabled and android:permission to the SDK's built-in BootReceiver:
[Android] Android 12 support for executing .start() and .getCurrentPosition() while the plugin is disabled and in the background. This is a bypass of new Android 12 restrictions for starting foreground-services in the background by taking advantage of AlarmManager.
Fatal Exception: android.app.ForegroundServiceStartNotAllowedException: startForegroundService() not allowed due to mAllowStartForeground false: service
[Android] Added two new androidx.lifecycle dependencies to plugin's build.gradle.
4.7.1 — 2022-05-12
ForegroundServiceStartNotAllowedException
: immediately launch the SDK'sTrackingService
as soon as.start()
executes. If a location-timeout occurs while fetching the onMotionChange position after device reboot withstartOnBoot: true
, theForegroundServiceStartNotAllowedException
could be raised.android:enabled
andandroid:permission
to the SDK's built-inBootReceiver
:.start()
and.getCurrentPosition()
while the plugin is disabled and in the background. This is a bypass of new Android 12 restrictions for starting foreground-services in the background by taking advantage of AlarmManager.androidx.lifecycle
dependencies to plugin'sbuild.gradle
."androidx.lifecycle:lifecycle-runtime"
"androidx.lifecycle:lifecycle-extensions"