Flutter Engine
The Flutter Engine
|
Public Member Functions | |
void | destroy () |
void | add (@NonNull FlutterPlugin plugin) |
void | add (@NonNull Set< FlutterPlugin > plugins) |
boolean | has (@NonNull Class<? extends FlutterPlugin > pluginClass) |
FlutterPlugin | get (@NonNull Class<? extends FlutterPlugin > pluginClass) |
void | remove (@NonNull Class<? extends FlutterPlugin > pluginClass) |
void | remove (@NonNull Set< Class<? extends FlutterPlugin > > pluginClasses) |
void | removeAll () |
void | attachToActivity ( @NonNull ExclusiveAppComponent< Activity > exclusiveActivity, @NonNull Lifecycle lifecycle) |
void | detachFromActivityForConfigChanges () |
void | detachFromActivity () |
boolean | onRequestPermissionsResult (int requestCode, @NonNull String[] permissions, @NonNull int[] grantResult) |
boolean | onActivityResult (int requestCode, int resultCode, @Nullable Intent data) |
void | onNewIntent (@NonNull Intent intent) |
void | onUserLeaveHint () |
void | onSaveInstanceState (@NonNull Bundle bundle) |
void | onRestoreInstanceState (@Nullable Bundle bundle) |
void | attachToService ( @NonNull Service service, @Nullable Lifecycle lifecycle, boolean isForeground) |
void | detachFromService () |
void | onMoveToForeground () |
void | onMoveToBackground () |
void | attachToBroadcastReceiver ( @NonNull BroadcastReceiver broadcastReceiver, @NonNull Lifecycle lifecycle) |
void | detachFromBroadcastReceiver () |
void | attachToContentProvider ( @NonNull ContentProvider contentProvider, @NonNull Lifecycle lifecycle) |
void | detachFromContentProvider () |
void | add (@NonNull FlutterPlugin plugin) |
void | add (@NonNull Set< FlutterPlugin > plugins) |
boolean | has (@NonNull Class<? extends FlutterPlugin > pluginClass) |
FlutterPlugin | get (@NonNull Class<? extends FlutterPlugin > pluginClass) |
void | remove (@NonNull Class<? extends FlutterPlugin > pluginClass) |
void | remove (@NonNull Set< Class<? extends FlutterPlugin > > plugins) |
void | removeAll () |
void | attachToActivity ( @NonNull ExclusiveAppComponent< Activity > exclusiveActivity, @NonNull Lifecycle lifecycle) |
void | detachFromActivityForConfigChanges () |
void | detachFromActivity () |
boolean | onRequestPermissionsResult (int requestCode, @NonNull String[] permissions, @NonNull int[] grantResult) |
boolean | onActivityResult (int requestCode, int resultCode, @Nullable Intent data) |
void | onNewIntent (@NonNull Intent intent) |
void | onUserLeaveHint () |
void | onSaveInstanceState (@NonNull Bundle bundle) |
void | onRestoreInstanceState (@Nullable Bundle bundle) |
void | attachToService ( @NonNull Service service, @Nullable Lifecycle lifecycle, boolean isForeground) |
void | detachFromService () |
void | onMoveToForeground () |
void | onMoveToBackground () |
void | attachToBroadcastReceiver ( @NonNull BroadcastReceiver broadcastReceiver, @NonNull Lifecycle lifecycle) |
void | detachFromBroadcastReceiver () |
void | attachToContentProvider ( @NonNull ContentProvider contentProvider, @NonNull Lifecycle lifecycle) |
void | detachFromContentProvider () |
Package Functions | |
FlutterEngineConnectionRegistry ( @NonNull Context appContext, @NonNull FlutterEngine flutterEngine, @NonNull FlutterLoader flutterLoader, @Nullable FlutterEngineGroup group) | |
This class is owned by the io.flutter.embedding.engine.FlutterEngine
and its role is to managed its connections with Android App Components and Flutter plugins.
It enforces the {0|1}:1 relationship between activity and engine, and propagates the app component connection to the plugins.
Definition at line 48 of file FlutterEngineConnectionRegistry.java.
|
inlinepackage |
Definition at line 97 of file FlutterEngineConnectionRegistry.java.
|
inline |
Attaches the given plugin
to the io.flutter.embedding.engine.FlutterEngine
associated with this PluginRegistry
.
Implements io.flutter.embedding.engine.plugins.PluginRegistry.
Definition at line 127 of file FlutterEngineConnectionRegistry.java.
|
inline |
Attaches the given plugins
to the io.flutter.embedding.engine.FlutterEngine
associated with this PluginRegistry
.
Implements io.flutter.embedding.engine.plugins.PluginRegistry.
Definition at line 200 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the ExclusiveAppComponent
that is displaying the visual content of the io.flutter.embedding.engine.FlutterEngine
that is associated with this
.
ActivityControlSurface
Once an ExclusiveAppComponent
is created, and its associated io.flutter.embedding.engine.FlutterEngine
is executing Dart code, the ExclusiveAppComponent
should invoke this method. At that point the io.flutter.embedding.engine.FlutterEngine
is considered "attached" to the ExclusiveAppComponent
and all ActivityAware
plugins are given access to the ExclusiveAppComponent
's android.app.Activity
.
Implements io.flutter.embedding.engine.plugins.activity.ActivityControlSurface.
Definition at line 314 of file FlutterEngineConnectionRegistry.java.
|
inline |
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
.
Implements io.flutter.embedding.engine.plugins.broadcastreceiver.BroadcastReceiverControlSurface.
Definition at line 560 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the ContentProvider
that is running the io.flutter.embedding.engine.FlutterEngine
that is associated with this
.
ContentProviderControlSurface
Once a ContentProvider
is created, and its associated io.flutter.embedding.engine.FlutterEngine
is executing Dart code, the ContentProvider
should invoke this method. At that point the io.flutter.embedding.engine.FlutterEngine
is considered "attached" to the ContentProvider
and all ContentProviderAware
plugins are given access to the ContentProvider
.
Implements io.flutter.embedding.engine.plugins.contentprovider.ContentProviderControlSurface.
Definition at line 608 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the Service
that is running the io.flutter.embedding.engine.FlutterEngine
that is associated with this
.
ServiceControlSurface
Once a Service
is created, and its associated io.flutter.embedding.engine.FlutterEngine
is executing Dart code, the Service
should invoke this method. At that point the io.flutter.embedding.engine.FlutterEngine
is considered "attached" to the Service
and all ServiceAware
plugins are given access to the Service
.
isForeground
should be true if the given Service
is running in the foreground, false otherwise.
Implements io.flutter.embedding.engine.plugins.service.ServiceControlSurface.
Definition at line 499 of file FlutterEngineConnectionRegistry.java.
|
inline |
Definition at line 114 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the android.app.Activity
that is attached to this
's
ActivityControlSurfacesio.flutter.embedding.engine.FlutterEngine
when the android.app.Activity
is about to be destroyed for non-configuration-change reasons.
This method gives each ActivityAware
plugin an opportunity to clean up its references before the is destroyed
.
Implements io.flutter.embedding.engine.plugins.activity.ActivityControlSurface.
Definition at line 376 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the android.app.Activity
that is attached to this
's
ActivityControlSurfacesio.flutter.embedding.engine.FlutterEngine
when the android.app.Activity
is about to be destroyed due to configuration changes.
This method gives each ActivityAware
plugin an opportunity to clean up its references before the is destroyed
.
Implements io.flutter.embedding.engine.plugins.activity.ActivityControlSurface.
Definition at line 357 of file FlutterEngineConnectionRegistry.java.
|
inline |
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
.
Implements io.flutter.embedding.engine.plugins.broadcastreceiver.BroadcastReceiverControlSurface.
Definition at line 582 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the ContentProvider
that is attached to this
's
ContentProviderControlSurfacesio.flutter.embedding.engine.FlutterEngine
when the ContentProvider
is about to be destroyed.
This method gives each ContentProviderAware
plugin an opportunity to clean up its references before the is destroyed
.
Implements io.flutter.embedding.engine.plugins.contentprovider.ContentProviderControlSurface.
Definition at line 631 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the Service
that is attached to this
's
ServiceControlSurfacesio.flutter.embedding.engine.FlutterEngine
when the Service
is about to be destroyed.
This method gives each ServiceAware
plugin an opportunity to clean up its references before the is destroyed
.
Implements io.flutter.embedding.engine.plugins.service.ServiceControlSurface.
Definition at line 516 of file FlutterEngineConnectionRegistry.java.
|
inline |
Returns the instance of a plugin that is currently attached to the io.flutter.embedding.engine.FlutterEngine
associated with this PluginRegistry
, which matches the given pluginClass
.
If no matching plugin is found, null
is returned.
Implements io.flutter.embedding.engine.plugins.PluginRegistry.
Definition at line 212 of file FlutterEngineConnectionRegistry.java.
|
inline |
Returns true if a plugin of the given type is currently attached to the io.flutter.embedding.engine.FlutterEngine
associated with this PluginRegistry
.
Implements io.flutter.embedding.engine.plugins.PluginRegistry.
Definition at line 207 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the android.app.Activity
that is attached to this
's
ActivityControlSurfaceio.flutter.embedding.engine.FlutterEngine
and the associated method in the Activity
is invoked.
Returns true if one or more plugins utilized this android.app.Activity
result.
Implements io.flutter.embedding.engine.plugins.activity.ActivityControlSurface.
Definition at line 418 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the Service
that is attached to this
's
ServiceControlSurfaceio.flutter.embedding.engine.FlutterEngine
when the Service
goes from foreground to background.
Implements io.flutter.embedding.engine.plugins.service.ServiceControlSurface.
Definition at line 544 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the Service
that is attached to this
's
ServiceControlSurfaceio.flutter.embedding.engine.FlutterEngine
when the Service
goes from background to foreground.
Implements io.flutter.embedding.engine.plugins.service.ServiceControlSurface.
Definition at line 534 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the android.app.Activity
that is attached to this
's
ActivityControlSurfaceio.flutter.embedding.engine.FlutterEngine
and the associated method in the Activity
is invoked.
Implements io.flutter.embedding.engine.plugins.activity.ActivityControlSurface.
Definition at line 434 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the android.app.Activity
that is attached to this
's
ActivityControlSurfaceio.flutter.embedding.engine.FlutterEngine
and the associated method in the Activity
is invoked.
Returns true if one or more plugins utilized this permission result.
Implements io.flutter.embedding.engine.plugins.activity.ActivityControlSurface.
Definition at line 400 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the android.app.Activity
or Fragment
that is attached to this ActivityControlSurface
's io.flutter.embedding.engine.FlutterEngine
when android.app.Activity#onCreate(Bundle)
or Fragment#onCreate(Bundle)
is invoked in the android.app.Activity
or Fragment
.
Implements io.flutter.embedding.engine.plugins.activity.ActivityControlSurface.
Definition at line 478 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the android.app.Activity
or Fragment
that is attached to this ActivityControlSurface
's io.flutter.embedding.engine.FlutterEngine
when the associated method is invoked in the android.app.Activity
or Fragment
.
Implements io.flutter.embedding.engine.plugins.activity.ActivityControlSurface.
Definition at line 463 of file FlutterEngineConnectionRegistry.java.
|
inline |
Call this method from the android.app.Activity
that is attached to this
's
ActivityControlSurfaceio.flutter.embedding.engine.FlutterEngine
and the associated method in the Activity
is invoked.
Implements io.flutter.embedding.engine.plugins.activity.ActivityControlSurface.
Definition at line 448 of file FlutterEngineConnectionRegistry.java.
|
inline |
Detaches the plugin of the given type from the io.flutter.embedding.engine.FlutterEngine
associated with this PluginRegistry
.
If no such plugin exists, this method does nothing.
Implements io.flutter.embedding.engine.plugins.PluginRegistry.
Definition at line 217 of file FlutterEngineConnectionRegistry.java.
|
inline |
Detaches the plugins of the given types from the io.flutter.embedding.engine.FlutterEngine
associated with this PluginRegistry
.
If no such plugins exist, this method does nothing.
Implements io.flutter.embedding.engine.plugins.PluginRegistry.
Definition at line 278 of file FlutterEngineConnectionRegistry.java.
|
inline |
Detaches all plugins that are currently attached to the io.flutter.embedding.engine.FlutterEngine
associated with this PluginRegistry
.
If no plugins are currently attached, this method does nothing.
Implements io.flutter.embedding.engine.plugins.PluginRegistry.
Definition at line 285 of file FlutterEngineConnectionRegistry.java.