Flutter Engine
The Flutter Engine
Public Member Functions | Static Package Attributes | List of all members
dev.flutter.scenarios.SpawnMultiEngineActivity Class Reference
Inheritance diagram for dev.flutter.scenarios.SpawnMultiEngineActivity:
dev.flutter.scenarios.TestActivity dev.flutter.scenarios.TestableFlutterActivity io.flutter.embedding.android.FlutterActivity io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.Host io.flutter.embedding.android.FlutterEngineProvider io.flutter.embedding.android.FlutterEngineConfigurator io.flutter.plugin.platform.PlatformPlugin.PlatformPluginDelegate

Public Member Functions

FlutterEngine provideFlutterEngine (@NonNull Context context)
 
- Public Member Functions inherited from dev.flutter.scenarios.TestActivity
FlutterShellArgs getFlutterShellArgs ()
 
void onFlutterUiDisplayed ()
 
- Public Member Functions inherited from dev.flutter.scenarios.TestableFlutterActivity
void configureFlutterEngine (@NonNull FlutterEngine flutterEngine)
 
void waitUntilFlutterRendered ()
 
- Public Member Functions inherited from io.flutter.embedding.android.FlutterActivity
 FlutterActivity ()
 
ExclusiveAppComponent< Activity > getExclusiveAppComponent ()
 
void registerOnBackInvokedCallback ()
 
void unregisterOnBackInvokedCallback ()
 
void setFrameworkHandlesBack (boolean frameworkHandlesBack)
 
void onPostResume ()
 
void release ()
 
void detachFromFlutterEngine ()
 
void onBackPressed ()
 
void startBackGesture (@NonNull BackEvent backEvent)
 
void updateBackGestureProgress (@NonNull BackEvent backEvent)
 
void commitBackGesture ()
 
void cancelBackGesture ()
 
void onRequestPermissionsResult (int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults)
 
void onUserLeaveHint ()
 
void onWindowFocusChanged (boolean hasFocus)
 
void onTrimMemory (int level)
 
Context getContext ()
 
Activity getActivity ()
 
Lifecycle getLifecycle ()
 
FlutterShellArgs getFlutterShellArgs ()
 
String getCachedEngineId ()
 
String getCachedEngineGroupId ()
 
boolean shouldDestroyEngineWithHost ()
 
String getDartEntrypointFunctionName ()
 
List< String > getDartEntrypointArgs ()
 
String getDartEntrypointLibraryUri ()
 
String getInitialRoute ()
 
String getAppBundlePath ()
 
RenderMode getRenderMode ()
 
TransparencyMode getTransparencyMode ()
 
FlutterEngine provideFlutterEngine (@NonNull Context context)
 
PlatformPlugin providePlatformPlugin ( @Nullable Activity activity, @NonNull FlutterEngine flutterEngine)
 
void configureFlutterEngine (@NonNull FlutterEngine flutterEngine)
 
void cleanUpFlutterEngine (@NonNull FlutterEngine flutterEngine)
 
boolean shouldAttachEngineToActivity ()
 
boolean shouldHandleDeeplinking ()
 
void onFlutterSurfaceViewCreated (@NonNull FlutterSurfaceView flutterSurfaceView)
 
void onFlutterTextureViewCreated (@NonNull FlutterTextureView flutterTextureView)
 
void onFlutterUiDisplayed ()
 
void onFlutterUiNoLongerDisplayed ()
 
boolean shouldRestoreAndSaveState ()
 
boolean shouldDispatchAppLifecycleState ()
 
boolean attachToEngineAutomatically ()
 
boolean popSystemNavigator ()
 
void updateSystemUiOverlays ()
 
Context getContext ()
 
boolean shouldHandleDeeplinking ()
 
Activity getActivity ()
 
Lifecycle getLifecycle ()
 
FlutterShellArgs getFlutterShellArgs ()
 
String getCachedEngineId ()
 
String getCachedEngineGroupId ()
 
boolean shouldDestroyEngineWithHost ()
 
void detachFromFlutterEngine ()
 
String getDartEntrypointFunctionName ()
 
String getDartEntrypointLibraryUri ()
 
List< String > getDartEntrypointArgs ()
 
String getAppBundlePath ()
 
String getInitialRoute ()
 
RenderMode getRenderMode ()
 
TransparencyMode getTransparencyMode ()
 
ExclusiveAppComponent< Activity > getExclusiveAppComponent ()
 
FlutterEngine provideFlutterEngine (@NonNull Context context)
 
PlatformPlugin providePlatformPlugin ( @Nullable Activity activity, @NonNull FlutterEngine flutterEngine)
 
void configureFlutterEngine (@NonNull FlutterEngine flutterEngine)
 
void cleanUpFlutterEngine (@NonNull FlutterEngine flutterEngine)
 
boolean shouldAttachEngineToActivity ()
 
void onFlutterSurfaceViewCreated (@NonNull FlutterSurfaceView flutterSurfaceView)
 
void onFlutterTextureViewCreated (@NonNull FlutterTextureView flutterTextureView)
 
void onFlutterUiDisplayed ()
 
void onFlutterUiNoLongerDisplayed ()
 
boolean shouldRestoreAndSaveState ()
 
void updateSystemUiOverlays ()
 
boolean shouldDispatchAppLifecycleState ()
 
boolean attachToEngineAutomatically ()
 
FlutterEngine provideFlutterEngine (@NonNull Context context)
 
void configureFlutterEngine (@NonNull FlutterEngine flutterEngine)
 
void cleanUpFlutterEngine (@NonNull FlutterEngine flutterEngine)
 
boolean popSystemNavigator ()
 
default void setFrameworkHandlesBack (boolean frameworkHandlesBack)
 

Static Package Attributes

static final String TAG = "Scenarios"
 

Additional Inherited Members

- Static Public Member Functions inherited from io.flutter.embedding.android.FlutterActivity
static Intent createDefaultIntent (@NonNull Context launchContext)
 
static NewEngineIntentBuilder withNewEngine ()
 
static CachedEngineIntentBuilder withCachedEngine (@NonNull String cachedEngineId)
 
static NewEngineInGroupIntentBuilder withNewEngineInGroup (@NonNull String engineGroupId)
 
- Static Public Attributes inherited from io.flutter.embedding.android.FlutterActivity
static final int FLUTTER_VIEW_ID = View.generateViewId()
 
- Protected Member Functions inherited from dev.flutter.scenarios.TestActivity
void onCreate (@Nullable Bundle savedInstanceState)
 
void onDestroy ()
 
void getScenarioParams (@NonNull Map< String, Object > args)
 
void testFlutterLoaderCallbackWhenInitializedTwice ()
 
- Protected Member Functions inherited from dev.flutter.scenarios.TestableFlutterActivity
void onCreate (@Nullable Bundle savedInstanceState)
 
void notifyFlutterRendered ()
 
- Protected Member Functions inherited from io.flutter.embedding.android.FlutterActivity
void onCreate (@Nullable Bundle savedInstanceState)
 
OnBackInvokedCallback getOnBackInvokedCallback ()
 
void onStart ()
 
void onResume ()
 
void onPause ()
 
void onStop ()
 
void onSaveInstanceState (Bundle outState)
 
void onDestroy ()
 
void onActivityResult (int requestCode, int resultCode, Intent data)
 
void onNewIntent (@NonNull Intent intent)
 
BackgroundMode getBackgroundMode ()
 
FlutterEngine getFlutterEngine ()
 
Bundle getMetaData () throws PackageManager.NameNotFoundException
 
- Protected Attributes inherited from io.flutter.embedding.android.FlutterActivity
FlutterActivityAndFragmentDelegate delegate
 
- Package Functions inherited from io.flutter.embedding.android.FlutterActivity
void setDelegate (@NonNull FlutterActivityAndFragmentDelegate delegate)
 

Detailed Description

Definition at line 12 of file SpawnMultiEngineActivity.java.

Member Function Documentation

◆ provideFlutterEngine()

FlutterEngine dev.flutter.scenarios.SpawnMultiEngineActivity.provideFlutterEngine ( @NonNull Context  context)
inline

Hook for subclasses to easily provide a custom io.flutter.embedding.engine.FlutterEngine.

This hook is where a cached io.flutter.embedding.engine.FlutterEngine should be provided, if a cached FlutterEngine is desired.

Reimplemented from io.flutter.embedding.android.FlutterActivity.

Definition at line 17 of file SpawnMultiEngineActivity.java.

17 {
18 FlutterEngineGroup engineGroup = new FlutterEngineGroup(context);
19 FlutterEngineGroup.Options options =
20 new FlutterEngineGroup.Options(context).setAutomaticallyRegisterPlugins(false);
21 FlutterEngine firstEngine = engineGroup.createAndRunEngine(options);
22
23 FlutterEngine secondEngine = engineGroup.createAndRunEngine(options);
24
25 // Check that a new engine can be spawned from the group even if the group's
26 // original engine has been destroyed.
27 firstEngine.destroy();
28 FlutterEngine thirdEngine = engineGroup.createAndRunEngine(options);
29
30 return thirdEngine;
31 }
const char * options

Member Data Documentation

◆ TAG

final String dev.flutter.scenarios.SpawnMultiEngineActivity.TAG = "Scenarios"
staticpackage

Definition at line 13 of file SpawnMultiEngineActivity.java.


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