getMotionAuthorizationStatus static method
Gets the motion authorization status. Returns:
- 0: Not Determined
- 1: Restricted
- 2: Denied
- 3: Authorized
Implementation
static Future<int> getMotionAuthorizationStatus() async {
try {
final int status = await _channel.invokeMethod('getMotionAuthorizationStatus');
return status;
} catch (e) {
print('Error getting motion authorization status: $e');
return 0; // Not Determined
}
}