disableBackgroundLocation method
仅支持android
关闭后台定位功能,关闭后台定位功能只是代表不再提供后台定位的能力,并不是停止定位,停止定位请调用
removeNotification
- 是否移除通知栏, true:移除通知栏,false:不移除通知栏,可以手动移除
Implementation
Future<bool> disableBackgroundLocation(
{bool removeNotification = true}) async {
if (!_isAndroid || !_isInitialize) return false;
final bool? state = await _channel.invokeMethod<bool>(
'disableBackgroundLocation', removeNotification);
return state ?? false;
}