Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Package Functions | List of all members
io.flutter.embedding.android.FlutterFragmentActivity Class Reference
Inheritance diagram for io.flutter.embedding.android.FlutterFragmentActivity:
io.flutter.embedding.android.FlutterEngineProvider io.flutter.embedding.android.FlutterEngineConfigurator io.flutter.embedding.android.FlutterFragmentActivityTest.FlutterFragmentActivityWithProvidedEngine

Classes

class  CachedEngineIntentBuilder
 
class  NewEngineInGroupIntentBuilder
 
class  NewEngineIntentBuilder
 

Public Member Functions

void onPostResume ()
 
void onBackPressed ()
 
void onRequestPermissionsResult (int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults)
 
void onUserLeaveHint ()
 
void onTrimMemory (int level)
 
boolean shouldDestroyEngineWithHost ()
 
FlutterEngine provideFlutterEngine (@NonNull Context context)
 
void configureFlutterEngine (@NonNull FlutterEngine flutterEngine)
 
void cleanUpFlutterEngine (@NonNull FlutterEngine flutterEngine)
 
String getDartEntrypointFunctionName ()
 
List< String > getDartEntrypointArgs ()
 
String getDartEntrypointLibraryUri ()
 

Static Public Member Functions

static Intent createDefaultIntent (@NonNull Context launchContext)
 
static NewEngineIntentBuilder withNewEngine ()
 
static CachedEngineIntentBuilder withCachedEngine (@NonNull String cachedEngineId)
 
static NewEngineInGroupIntentBuilder withNewEngineInGroup (@NonNull String engineGroupId)
 

Static Public Attributes

static final int FRAGMENT_CONTAINER_ID = View.generateViewId()
 

Protected Member Functions

void onCreate (@Nullable Bundle savedInstanceState)
 
FlutterFragment createFlutterFragment ()
 
void onNewIntent (@NonNull Intent intent)
 
void onActivityResult (int requestCode, int resultCode, Intent data)
 
FlutterEngine getFlutterEngine ()
 
boolean shouldAttachEngineToActivity ()
 
boolean shouldHandleDeeplinking ()
 
String getAppBundlePath ()
 
Bundle getMetaData () throws PackageManager.NameNotFoundException
 
String getInitialRoute ()
 
String getCachedEngineId ()
 
String getCachedEngineGroupId ()
 
BackgroundMode getBackgroundMode ()
 
RenderMode getRenderMode ()
 
FrameLayout provideRootLayout (Context context)
 

Package Functions

FlutterFragment retrieveExistingFlutterFragmentIfPossible ()
 

Detailed Description

A Flutter Activity that is based upon FragmentActivity.

FlutterFragmentActivity exists because there are some Android APIs in the ecosystem that only accept a FragmentActivity. If a FragmentActivity is not required, you should consider using a regular FlutterActivity instead, because FlutterActivity is considered to be the standard, canonical implementation of a Flutter Activity.

Definition at line 61 of file FlutterFragmentActivity.java.

Member Function Documentation

◆ cleanUpFlutterEngine()

void io.flutter.embedding.android.FlutterFragmentActivity.cleanUpFlutterEngine ( @NonNull FlutterEngine  flutterEngine)
inline

Hook for the host to cleanup references that were established in configureFlutterEngine(FlutterEngine) before the host is destroyed or detached.

This method is called in onDestroy().

Implements io.flutter.embedding.android.FlutterEngineConfigurator.

Definition at line 747 of file FlutterFragmentActivity.java.

747 {
748 // No-op. Hook for subclasses.
749 }

◆ configureFlutterEngine()

void io.flutter.embedding.android.FlutterFragmentActivity.configureFlutterEngine ( @NonNull FlutterEngine  flutterEngine)
inline

Hook for subclasses to easily configure a FlutterEngine.

This method is called after provideFlutterEngine(Context).

All plugins listed in the app's pubspec are registered in the base implementation of this method unless the FlutterEngine for this activity was externally created. To avoid the automatic plugin registration for implicitly created FlutterEngines, override this method without invoking super(). To keep automatic plugin registration and further configure the FlutterEngine, override this method, invoke super(), and then configure the FlutterEngine as desired.

Implements io.flutter.embedding.android.FlutterEngineConfigurator.

Definition at line 729 of file FlutterFragmentActivity.java.

729 {
730 if (flutterFragment != null && flutterFragment.isFlutterEngineInjected()) {
731 // If the FlutterEngine was explicitly built and injected into this FlutterActivity, the
732 // builder should explicitly decide whether to automatically register plugins via the
733 // FlutterEngine's construction parameter or via the AndroidManifest metadata.
734 return;
735 }
736
737 GeneratedPluginRegister.registerGeneratedPlugins(flutterEngine);
738 }

◆ createDefaultIntent()

static Intent io.flutter.embedding.android.FlutterFragmentActivity.createDefaultIntent ( @NonNull Context  launchContext)
inlinestatic

Creates an Intent that launches a FlutterFragmentActivity, which executes a main() Dart entrypoint, and displays the "/" route as Flutter's initial route.

Definition at line 75 of file FlutterFragmentActivity.java.

◆ createFlutterFragment()

FlutterFragment io.flutter.embedding.android.FlutterFragmentActivity.createFlutterFragment ( )
inlineprotected

Creates the instance of the FlutterFragment that this FlutterFragmentActivity displays.

Subclasses may override this method to return a specialization of FlutterFragment.

Reimplemented in io.flutter.embedding.android.FlutterFragmentActivityTest.FlutterFragmentActivityWithProvidedEngine.

Definition at line 513 of file FlutterFragmentActivity.java.

513 {
514 final BackgroundMode backgroundMode = getBackgroundMode();
515 final RenderMode renderMode = getRenderMode();
516 final TransparencyMode transparencyMode =
517 backgroundMode == BackgroundMode.opaque
518 ? TransparencyMode.opaque
519 : TransparencyMode.transparent;
520 final boolean shouldDelayFirstAndroidViewDraw = renderMode == RenderMode.surface;
521
522 if (getCachedEngineId() != null) {
523 Log.v(
524 TAG,
525 "Creating FlutterFragment with cached engine:\n"
526 + "Cached engine ID: "
528 + "\n"
529 + "Will destroy engine when Activity is destroyed: "
531 + "\n"
532 + "Background transparency mode: "
533 + backgroundMode
534 + "\n"
535 + "Will attach FlutterEngine to Activity: "
537
538 return FlutterFragment.withCachedEngine(getCachedEngineId())
539 .renderMode(renderMode)
540 .transparencyMode(transparencyMode)
541 .handleDeeplinking(shouldHandleDeeplinking())
542 .shouldAttachEngineToActivity(shouldAttachEngineToActivity())
543 .destroyEngineWithFragment(shouldDestroyEngineWithHost())
544 .shouldDelayFirstAndroidViewDraw(shouldDelayFirstAndroidViewDraw)
545 .build();
546 } else {
547 Log.v(
548 TAG,
549 "Creating FlutterFragment with new engine:\n"
550 + "Cached engine group ID: "
552 + "\n"
553 + "Background transparency mode: "
554 + backgroundMode
555 + "\n"
556 + "Dart entrypoint: "
558 + "\n"
559 + "Dart entrypoint library uri: "
561 + "\n"
562 + "Initial route: "
564 + "\n"
565 + "App bundle path: "
567 + "\n"
568 + "Will attach FlutterEngine to Activity: "
570
571 if (getCachedEngineGroupId() != null) {
572 return FlutterFragment.withNewEngineInGroup(getCachedEngineGroupId())
573 .dartEntrypoint(getDartEntrypointFunctionName())
574 .initialRoute(getInitialRoute())
575 .handleDeeplinking(shouldHandleDeeplinking())
576 .renderMode(renderMode)
577 .transparencyMode(transparencyMode)
578 .shouldAttachEngineToActivity(shouldAttachEngineToActivity())
579 .shouldDelayFirstAndroidViewDraw(shouldDelayFirstAndroidViewDraw)
580 .build();
581 }
582
583 return FlutterFragment.withNewEngine()
584 .dartEntrypoint(getDartEntrypointFunctionName())
585 .dartLibraryUri(getDartEntrypointLibraryUri())
586 .dartEntrypointArgs(getDartEntrypointArgs())
587 .initialRoute(getInitialRoute())
588 .appBundlePath(getAppBundlePath())
589 .flutterShellArgs(FlutterShellArgs.fromIntent(getIntent()))
590 .handleDeeplinking(shouldHandleDeeplinking())
591 .renderMode(renderMode)
592 .transparencyMode(transparencyMode)
593 .shouldAttachEngineToActivity(shouldAttachEngineToActivity())
594 .shouldDelayFirstAndroidViewDraw(shouldDelayFirstAndroidViewDraw)
595 .build();
596 }
597 }
void Log(const char *format,...) SK_PRINTF_LIKE(1

◆ getAppBundlePath()

String io.flutter.embedding.android.FlutterFragmentActivity.getAppBundlePath ( )
inlineprotected

A custom path to the bundle that contains this Flutter app's resources, e.g., Dart code snapshots.

When this FlutterFragmentActivity is run by Flutter tooling and a data String is included in the launching Intent, that data String is interpreted as an app bundle path.

When otherwise unspecified, the value is null, which defaults to the app bundle path defined in io.flutter.embedding.engine.loader.FlutterLoader#findAppBundlePath().

Subclasses may override this method to return a custom app bundle path.

Definition at line 765 of file FlutterFragmentActivity.java.

765 {
766 // If this Activity was launched from tooling, and the incoming Intent contains
767 // a custom app bundle path, return that path.
768 // TODO(mattcarroll): determine if we should have an explicit FlutterTestActivity instead of
769 // conflating.
770 if (isDebuggable() && Intent.ACTION_RUN.equals(getIntent().getAction())) {
771 String appBundlePath = getIntent().getDataString();
772 if (appBundlePath != null) {
773 return appBundlePath;
774 }
775 }
776
777 return null;
778 }

◆ getBackgroundMode()

BackgroundMode io.flutter.embedding.android.FlutterFragmentActivity.getBackgroundMode ( )
inlineprotected

The desired window background mode of this Activity, which defaults to BackgroundMode#opaque.

Definition at line 907 of file FlutterFragmentActivity.java.

907 {
908 if (getIntent().hasExtra(EXTRA_BACKGROUND_MODE)) {
909 return BackgroundMode.valueOf(getIntent().getStringExtra(EXTRA_BACKGROUND_MODE));
910 } else {
911 return BackgroundMode.opaque;
912 }
913 }

◆ getCachedEngineGroupId()

String io.flutter.embedding.android.FlutterFragmentActivity.getCachedEngineGroupId ( )
inlineprotected

Definition at line 898 of file FlutterFragmentActivity.java.

898 {
899 return getIntent().getStringExtra(EXTRA_CACHED_ENGINE_GROUP_ID);
900 }

◆ getCachedEngineId()

String io.flutter.embedding.android.FlutterFragmentActivity.getCachedEngineId ( )
inlineprotected

Returns the ID of a statically cached io.flutter.embedding.engine.FlutterEngine to use within this FlutterFragmentActivity, or null if this
FlutterFragmentActivity
does not want to use a cached io.flutter.embedding.engine.FlutterEngine.

Definition at line 893 of file FlutterFragmentActivity.java.

893 {
894 return getIntent().getStringExtra(EXTRA_CACHED_ENGINE_ID);
895 }

◆ getDartEntrypointArgs()

List< String > io.flutter.embedding.android.FlutterFragmentActivity.getDartEntrypointArgs ( )
inline

The Dart entrypoint arguments will be passed as a list of string to Dart's entrypoint function.

A value of null means do not pass any arguments to Dart's entrypoint function.

Subclasses may override this method to directly control the Dart entrypoint arguments.

Definition at line 817 of file FlutterFragmentActivity.java.

817 {
818 return (List<String>) getIntent().getSerializableExtra(EXTRA_DART_ENTRYPOINT_ARGS);
819 }

◆ getDartEntrypointFunctionName()

String io.flutter.embedding.android.FlutterFragmentActivity.getDartEntrypointFunctionName ( )
inline

The Dart entrypoint that will be executed as soon as the Dart snapshot is loaded.

This preference can be controlled by setting a <meta-data> called FlutterActivityLaunchConfigs#DART_ENTRYPOINT_META_DATA_KEY within the Android manifest definition for this FlutterFragmentActivity.

Subclasses may override this method to directly control the Dart entrypoint.

Definition at line 798 of file FlutterFragmentActivity.java.

798 {
799 try {
800 Bundle metaData = getMetaData();
801 String desiredDartEntrypoint =
802 metaData != null ? metaData.getString(DART_ENTRYPOINT_META_DATA_KEY) : null;
803 return desiredDartEntrypoint != null ? desiredDartEntrypoint : DEFAULT_DART_ENTRYPOINT;
804 } catch (PackageManager.NameNotFoundException e) {
805 return DEFAULT_DART_ENTRYPOINT;
806 }
807 }

◆ getDartEntrypointLibraryUri()

String io.flutter.embedding.android.FlutterFragmentActivity.getDartEntrypointLibraryUri ( )
inline

The Dart library URI for the entrypoint that will be executed as soon as the Dart snapshot is loaded.

Example value: "package:foo/bar.dart"

This preference can be controlled by setting a <meta-data> called FlutterActivityLaunchConfigs#DART_ENTRYPOINT_URI_META_DATA_KEY within the Android manifest definition for this FlutterFragmentActivity.

A value of null means use the default root library.

Subclasses may override this method to directly control the Dart entrypoint uri.

Definition at line 836 of file FlutterFragmentActivity.java.

836 {
837 try {
838 Bundle metaData = getMetaData();
839 String desiredDartLibraryUri =
840 metaData != null ? metaData.getString(DART_ENTRYPOINT_URI_META_DATA_KEY) : null;
841 return desiredDartLibraryUri;
842 } catch (PackageManager.NameNotFoundException e) {
843 return null;
844 }
845 }

◆ getFlutterEngine()

FlutterEngine io.flutter.embedding.android.FlutterFragmentActivity.getFlutterEngine ( )
inlineprotected

Definition at line 652 of file FlutterFragmentActivity.java.

652 {
653 return flutterFragment.getFlutterEngine();
654 }

◆ getInitialRoute()

String io.flutter.embedding.android.FlutterFragmentActivity.getInitialRoute ( )
inlineprotected

The initial route that a Flutter app will render upon loading and executing its Dart code.

This preference can be controlled with 2 methods:

  1. Pass a boolean as FlutterActivityLaunchConfigs#EXTRA_INITIAL_ROUTE with the launching Intent, or
  2. Set a <meta-data> called FlutterActivityLaunchConfigs#INITIAL_ROUTE_META_DATA_KEY for this Activity in the Android manifest.

If both preferences are set, the Intent preference takes priority.

The reason that a <meta-data> preference is supported is because this
Activity
might be the very first Activity launched, which means the developer won't have control over the incoming Intent.

Subclasses may override this method to directly control the initial route.

If this method returns null and the shouldHandleDeeplinking returns true, the initial route is derived from the Intent through the Intent.getData() instead.

Definition at line 871 of file FlutterFragmentActivity.java.

871 {
872 if (getIntent().hasExtra(EXTRA_INITIAL_ROUTE)) {
873 return getIntent().getStringExtra(EXTRA_INITIAL_ROUTE);
874 }
875
876 try {
877 Bundle metaData = getMetaData();
878 String desiredInitialRoute =
879 metaData != null ? metaData.getString(INITIAL_ROUTE_META_DATA_KEY) : null;
880 return desiredInitialRoute;
881 } catch (PackageManager.NameNotFoundException e) {
882 return null;
883 }
884 }

◆ getMetaData()

Bundle io.flutter.embedding.android.FlutterFragmentActivity.getMetaData ( ) throws PackageManager.NameNotFoundException
inlineprotected

Retrieves the meta data specified in the AndroidManifest.xml.

Definition at line 782 of file FlutterFragmentActivity.java.

782 {
783 ActivityInfo activityInfo =
784 getPackageManager().getActivityInfo(getComponentName(), PackageManager.GET_META_DATA);
785 return activityInfo.metaData;
786 }

◆ getRenderMode()

RenderMode io.flutter.embedding.android.FlutterFragmentActivity.getRenderMode ( )
inlineprotected

Returns the desired RenderMode for the FlutterView displayed in this
FlutterFragmentActivity
.

That is, RenderMode#surface if FlutterFragmentActivity#getBackgroundMode() is BackgroundMode#opaque or RenderMode#texture otherwise.

Definition at line 923 of file FlutterFragmentActivity.java.

923 {
924 final BackgroundMode backgroundMode = getBackgroundMode();
925 return backgroundMode == BackgroundMode.opaque ? RenderMode.surface : RenderMode.texture;
926 }

◆ onActivityResult()

void io.flutter.embedding.android.FlutterFragmentActivity.onActivityResult ( int  requestCode,
int  resultCode,
Intent  data 
)
inlineprotected

Definition at line 645 of file FlutterFragmentActivity.java.

645 {
646 super.onActivityResult(requestCode, resultCode, data);
647 flutterFragment.onActivityResult(requestCode, resultCode, data);
648 }
void onActivityResult(int requestCode, int resultCode, Intent data)

◆ onBackPressed()

void io.flutter.embedding.android.FlutterFragmentActivity.onBackPressed ( )
inline

Definition at line 621 of file FlutterFragmentActivity.java.

621 {
622 flutterFragment.onBackPressed();
623 }

◆ onCreate()

void io.flutter.embedding.android.FlutterFragmentActivity.onCreate ( @Nullable Bundle  savedInstanceState)
inlineprotected

Definition at line 373 of file FlutterFragmentActivity.java.

373 {
374 switchLaunchThemeForNormalTheme();
375 // Get an existing fragment reference first before onCreate since onCreate would re-attach
376 // existing fragments. This would cause FlutterFragment to reference the host activity which
377 // should be aware of its child fragment.
379
380 super.onCreate(savedInstanceState);
381
382 configureWindowForTransparency();
383 setContentView(createFragmentContainer());
384 configureStatusBarForFullscreenFlutterExperience();
385 ensureFlutterFragmentCreated();
386 }

◆ onNewIntent()

void io.flutter.embedding.android.FlutterFragmentActivity.onNewIntent ( @NonNull Intent  intent)
inlineprotected

Definition at line 613 of file FlutterFragmentActivity.java.

613 {
614 // Forward Intents to our FlutterFragment in case it cares.
615 flutterFragment.onNewIntent(intent);
616 super.onNewIntent(intent);
617 }

◆ onPostResume()

void io.flutter.embedding.android.FlutterFragmentActivity.onPostResume ( )
inline

Definition at line 607 of file FlutterFragmentActivity.java.

607 {
608 super.onPostResume();
609 flutterFragment.onPostResume();
610 }

◆ onRequestPermissionsResult()

void io.flutter.embedding.android.FlutterFragmentActivity.onRequestPermissionsResult ( int  requestCode,
@NonNull String[]  permissions,
@NonNull int[]  grantResults 
)
inline

Definition at line 626 of file FlutterFragmentActivity.java.

627 {
628 super.onRequestPermissionsResult(requestCode, permissions, grantResults);
629 flutterFragment.onRequestPermissionsResult(requestCode, permissions, grantResults);
630 }
void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults)

◆ onTrimMemory()

void io.flutter.embedding.android.FlutterFragmentActivity.onTrimMemory ( int  level)
inline

Definition at line 639 of file FlutterFragmentActivity.java.

639 {
640 super.onTrimMemory(level);
641 flutterFragment.onTrimMemory(level);
642 }

◆ onUserLeaveHint()

void io.flutter.embedding.android.FlutterFragmentActivity.onUserLeaveHint ( )
inline

Definition at line 634 of file FlutterFragmentActivity.java.

634 {
635 flutterFragment.onUserLeaveHint();
636 }

◆ provideFlutterEngine()

FlutterEngine io.flutter.embedding.android.FlutterFragmentActivity.provideFlutterEngine ( @NonNull Context  context)
inline

Hook for subclasses to easily provide a custom FlutterEngine.

Implements io.flutter.embedding.android.FlutterEngineProvider.

Reimplemented in io.flutter.embedding.android.FlutterFragmentActivityTest.FlutterFragmentActivityWithProvidedEngine.

Definition at line 711 of file FlutterFragmentActivity.java.

711 {
712 // No-op. Hook for subclasses.
713 return null;
714 }

◆ provideRootLayout()

FrameLayout io.flutter.embedding.android.FlutterFragmentActivity.provideRootLayout ( Context  context)
inlineprotected

Returns a FrameLayout that is used as the content view of this activity.

Definition at line 939 of file FlutterFragmentActivity.java.

939 {
940 return new FrameLayout(context);
941 }

◆ retrieveExistingFlutterFragmentIfPossible()

FlutterFragment io.flutter.embedding.android.FlutterFragmentActivity.retrieveExistingFlutterFragmentIfPossible ( )
inlinepackage

Retrieves the previously created FlutterFragment if possible.

If the activity is recreated, an existing FlutterFragment may already exist. Retain a reference to that FlutterFragment in the #flutterFragment field and avoid re-creating another FlutterFragment.

Definition at line 476 of file FlutterFragmentActivity.java.

476 {
477 FragmentManager fragmentManager = getSupportFragmentManager();
478 return (FlutterFragment) fragmentManager.findFragmentByTag(TAG_FLUTTER_FRAGMENT);
479 }

◆ shouldAttachEngineToActivity()

boolean io.flutter.embedding.android.FlutterFragmentActivity.shouldAttachEngineToActivity ( )
inlineprotected

Hook for subclasses to control whether or not the FlutterFragment within this
Activity
automatically attaches its io.flutter.embedding.engine.FlutterEngine to this Activity.

For an explanation of why this control exists, see FlutterFragment.NewEngineFragmentBuilder#shouldAttachEngineToActivity().

This property is controlled with a protected method instead of an Intent argument because the only situation where changing this value would help, is a situation in which
FlutterFragmentActivity
is being subclassed to utilize a custom and/or cached FlutterEngine.

Defaults to true.

Definition at line 684 of file FlutterFragmentActivity.java.

684 {
685 return true;
686 }

◆ shouldDestroyEngineWithHost()

boolean io.flutter.embedding.android.FlutterFragmentActivity.shouldDestroyEngineWithHost ( )
inline

Returns false if the io.flutter.embedding.engine.FlutterEngine backing this
FlutterFragmentActivity
should outlive this FlutterFragmentActivity, or true to be destroyed when the FlutterFragmentActivity is destroyed.

The default value is true in cases where FlutterFragmentActivity created its own io.flutter.embedding.engine.FlutterEngine, and false in cases where a cached io.flutter.embedding.engine.FlutterEngine was provided.

Definition at line 665 of file FlutterFragmentActivity.java.

665 {
666 return getIntent().getBooleanExtra(EXTRA_DESTROY_ENGINE_WITH_ACTIVITY, false);
667 }

◆ shouldHandleDeeplinking()

boolean io.flutter.embedding.android.FlutterFragmentActivity.shouldHandleDeeplinking ( )
inlineprotected

Whether to handle the deeplinking from the Intent automatically if the
getInitialRoute
returns null.

The default implementation looks <meta-data> called FlutterActivityLaunchConfigs#HANDLE_DEEPLINKING_META_DATA_KEY within the Android manifest definition for this FlutterFragmentActivity.

Definition at line 697 of file FlutterFragmentActivity.java.

697 {
698 try {
699 Bundle metaData = getMetaData();
701 metaData != null ? metaData.getBoolean(HANDLE_DEEPLINKING_META_DATA_KEY) : false;
703 } catch (PackageManager.NameNotFoundException e) {
704 return false;
705 }
706 }

◆ withCachedEngine()

static CachedEngineIntentBuilder io.flutter.embedding.android.FlutterFragmentActivity.withCachedEngine ( @NonNull String  cachedEngineId)
inlinestatic

Creates a CachedEngineIntentBuilder, which can be used to configure an Intent to launch a FlutterFragmentActivity that internally uses an existing FlutterEngine that is cached in io.flutter.embedding.engine.FlutterEngineCache.

Definition at line 186 of file FlutterFragmentActivity.java.

186 {
187 return new CachedEngineIntentBuilder(FlutterFragmentActivity.class, cachedEngineId);
188 }

◆ withNewEngine()

static NewEngineIntentBuilder io.flutter.embedding.android.FlutterFragmentActivity.withNewEngine ( )
inlinestatic

Creates an FlutterFragmentActivity.NewEngineIntentBuilder, which can be used to configure an Intent to launch a FlutterFragmentActivity that internally creates a new io.flutter.embedding.engine.FlutterEngine using the desired Dart entrypoint, initial route, etc.

Definition at line 86 of file FlutterFragmentActivity.java.

86 {
87 return new NewEngineIntentBuilder(FlutterFragmentActivity.class);
88 }

◆ withNewEngineInGroup()

static NewEngineInGroupIntentBuilder io.flutter.embedding.android.FlutterFragmentActivity.withNewEngineInGroup ( @NonNull String  engineGroupId)
inlinestatic

Creates a NewEngineInGroupIntentBuilder, which can be used to configure an Intent to launch a FlutterFragmentActivity that internally uses an existing io.flutter.embedding.engine.FlutterEngineGroup that is cached in io.flutter.embedding.engine.FlutterEngineGroupCache.

Parameters
engineGroupIdA cached engine group ID.
Returns
The builder.

Definition at line 273 of file FlutterFragmentActivity.java.

273 {
274 return new NewEngineInGroupIntentBuilder(FlutterFragmentActivity.class, engineGroupId);
275 }

Member Data Documentation

◆ FRAGMENT_CONTAINER_ID

final int io.flutter.embedding.android.FlutterFragmentActivity.FRAGMENT_CONTAINER_ID = View.generateViewId()
static

Definition at line 68 of file FlutterFragmentActivity.java.


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