iOS 14 introduces yet another change to the location authorization dialog with a new “Precise” switch. This switch will default to “On”. If the user disables Precise location, location accuracy will be reduced to ~5000 meters and locations could be up to 20 minutes old.
If the user disables this switch, you will learn this in the
onProviderChange event via new event-attribute
However, iOS 14 now provides a new method to temporarily request full accuracy from the user until the next launch of the application:
BackgroundGeolocation.requestTemporaryFullAccuracy (see API docs Cordova, React Native, Flutter)
iOS will present the following dialog to the user:
The highlighted String in the dialog above, called the “Purpose String”, is supplied to the first parameter of
Putting it all together, the following animation demonstrates disabling Precise Location followed by a request for temporary full accuracy authorization:
Note: for Android, both
ProviderChangeEvent.accuracyAuthorization will always return
ACCURACY_AUTHORIZATION_FULL. In the future, however, we believe Android too will eventually follow iOS’ lead on this new privacy mechanism.
With Android 11, location-authorization follows a similar strategy that iOS 13 introduced, where the Always option is no longer presented on the permission dialog. Instead, users will have to explicitly click “Allow in Settings” which simply redirects the user to your application’s Location permission screen. It will be completely up to the user to select “Allow all the time”. Unlike iOS, there is no secondary dialog prompting the user to “Change to Always Allow”.