disableForeground method

Future<void> disableForeground({
  1. bool removeNotification = true,
})

关闭前台定位服务。

Platforms:

  • 🅰️ Android:支持
  • 🍏 iOS:不支持,抛出 TencentLocationError(错误码 unsupportedOnThisPlatform
  • 🔶 Harmony:不支持,抛出 TencentLocationError(错误码 unsupportedOnThisPlatform

Parameters:

  • removeNotification:关闭服务时是否一并移除通知栏的通知。

Implementation

Future<void> disableForeground({bool removeNotification = true}) =>
    _after(() => _platform.disableForeground(
        managerId: _id, removeNotification: removeNotification));