checkCallPermissions method

  1. @override
Future<Map<String, bool>> checkCallPermissions()
override

Returns the current state of OEM permissions that affect whether call notifications can show a full-screen UI on locked / background devices.

Map keys:

  • fullScreenIntent: Android 14+ full-screen intent permission
  • overlay: SYSTEM_ALERT_WINDOW (required on Xiaomi / MIUI)
  • batteryOptimized: whether the app is exempt from Doze

Implementation

@override
Future<Map<String, bool>> checkCallPermissions() async {
  final result = await methodChannel.invokeMapMethod<String, dynamic>(
    'checkCallPermissions',
  );
  if (result == null) return const {};
  return result.map((k, v) => MapEntry(k, v as bool));
}