Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
io.flutter.embedding.engine.plugins.broadcastreceiver.BroadcastReceiverControlSurface Interface Reference

Public Member Functions

void attachToBroadcastReceiver ( @NonNull BroadcastReceiver broadcastReceiver, @NonNull Lifecycle lifecycle)
 
void detachFromBroadcastReceiver ()
 

Detailed Description

Control surface through which a BroadcastReceiver attaches to a io.flutter.embedding.engine.FlutterEngine.

A BroadcastReceiver that contains a io.flutter.embedding.engine.FlutterEngine should coordinate itself with the io.flutter.embedding.engine.FlutterEngine's
BroadcastReceiverControlSurface
.

Definition at line 19 of file BroadcastReceiverControlSurface.java.

Member Function Documentation

◆ attachToBroadcastReceiver()

void io.flutter.embedding.engine.plugins.broadcastreceiver.BroadcastReceiverControlSurface.attachToBroadcastReceiver ( @NonNull BroadcastReceiver  broadcastReceiver,
@NonNull Lifecycle  lifecycle 
)

Call this method from the BroadcastReceiver that is running the io.flutter.embedding.engine.FlutterEngine that is associated with this
BroadcastReceiverControlSurface
.

Once a BroadcastReceiver is created, and its associated io.flutter.embedding.engine.FlutterEngine is executing Dart code, the BroadcastReceiver should invoke this method. At that point the io.flutter.embedding.engine.FlutterEngine is considered "attached" to the BroadcastReceiver and all BroadcastReceiverAware plugins are given access to the BroadcastReceiver.

◆ detachFromBroadcastReceiver()

void io.flutter.embedding.engine.plugins.broadcastreceiver.BroadcastReceiverControlSurface.detachFromBroadcastReceiver ( )

Call this method from the BroadcastReceiver that is attached to this
BroadcastReceiverControlSurfaces
's io.flutter.embedding.engine.FlutterEngine when the BroadcastReceiver is about to be destroyed.

This method gives each BroadcastReceiverAware plugin an opportunity to clean up its references before the is destroyed.


The documentation for this interface was generated from the following file: