serviceStatus property
Future<ServiceStatus>
get
serviceStatus
Checks the current status of the service associated with the given Permission.
Notes about specific permissions:
- Permission.phone
- Android:
- The method will return ServiceStatus.notApplicable when:
- the device lacks the TELEPHONY feature
- TelephonyManager.getPhoneType() returns PHONE_TYPE_NONE
- when no Intents can be resolved to handle the
tel:
scheme
- The method will return ServiceStatus.disabled when:
- the SIM card is missing
- The method will return ServiceStatus.notApplicable when:
- iOS:
- The method will return ServiceStatus.notApplicable when:
- the native code can not find a handler for the
tel:
scheme
- the native code can not find a handler for the
- The method will return ServiceStatus.disabled when:
- the mobile network code (MNC) is either 0 or 65535. See https://stackoverflow.com/a/11595365 for details
- The method will return ServiceStatus.notApplicable when:
- PLEASE NOTE that this is still not a perfect indication of the device's capability to place & connect phone calls as it also depends on the network condition.
- Android:
- Permission.bluetooth
- iOS:
- The method will always return ServiceStatus.disabled when the Bluetooth permission was denied by the user. It is impossible to obtain the actual Bluetooth service status without having the Bluetooth permission granted.
- The method will prompt the user for Bluetooth permission if the permission was not yet requested.
- iOS:
Implementation
Future<ServiceStatus> get serviceStatus => _handler.checkServiceStatus(this);