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<Ref>(
    'android.content.Context::registerReceiver',
    {
      '__this__': this,
      'broadcastReceiver': receiver,
      'intentFilter': intentFilter,
    },
  );
  return android_content_Intent()..refId = result.refId;
}