registerReceiver method

Future<android_content_Intent> registerReceiver(
  1. android_content_BroadcastReceiver receiver,
  2. android_content_IntentFilter intentFilter
)

Implementation

Future<android_content_Intent> registerReceiver(
  android_content_BroadcastReceiver receiver,
  android_content_IntentFilter intentFilter,
) async {
  final result = await kMethodChannel.invokeMethod(
    'android.content.Context::registerReceiver',
    {
      'refId': refId,
      'broadcastReceiver': receiver.refId,
      'intentFilter': intentFilter.refId,
    },
  );
  return android_content_Intent()..refId = result;
}