setBackgroundLocationAllowed method
- bool allowed
override
On iOS devices this enables or disables application's background location updates.
By default background location updates
are enabled if application has background location capabilities.
Set allowed to true to allow background location updates, or false to disable them.
Returns LocationEngineStatus.ok if call succeeds. LocationEngineStatus.notAllowed if the application
does not have background location capabilities enabled.
On Android devices this is not supported and LocationEngineStatus.notSupported is returned.
Implementation
LocationEngineStatus setBackgroundLocationAllowed(bool allowed) {
if (Platform.isIOS) {
return _location.setBackgroundLocationAllowed(allowed);
}
return LocationEngineStatus.notSupported;
}