Flutter Engine
The Flutter Engine
|
Public Member Functions | |
void | attachToBroadcastReceiver ( @NonNull BroadcastReceiver broadcastReceiver, @NonNull Lifecycle lifecycle) |
void | detachFromBroadcastReceiver () |
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.
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
.
void io.flutter.embedding.engine.plugins.broadcastreceiver.BroadcastReceiverControlSurface.detachFromBroadcastReceiver | ( | ) |
Call this method from the BroadcastReceiver
that is attached to this
's
BroadcastReceiverControlSurfacesio.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
.