Flutter Engine
The Flutter Engine
Public Member Functions | Protected Member Functions | List of all members
io.flutter.app.FlutterFragmentActivity Class Reference
Inheritance diagram for io.flutter.app.FlutterFragmentActivity:
io.flutter.view.FlutterView.Provider io.flutter.plugin.common.PluginRegistry io.flutter.app.FlutterActivityDelegate.ViewFactory

Public Member Functions

FlutterView getFlutterView ()
 
FlutterView createFlutterView (Context context)
 
FlutterNativeView createFlutterNativeView ()
 
boolean retainFlutterNativeView ()
 
final boolean hasPlugin (String key)
 
final< T > T valuePublishedByPlugin (String pluginKey)
 
final Registrar registrarFor (String pluginKey)
 
void onBackPressed ()
 
void onRequestPermissionsResult (int requestCode, String[] permissions, int[] grantResults)
 
void onUserLeaveHint ()
 
void onWindowFocusChanged (boolean hasFocus)
 
void onTrimMemory (int level)
 
void onLowMemory ()
 
void onConfigurationChanged (Configuration newConfig)
 
FlutterView getFlutterView ()
 
- Public Member Functions inherited from io.flutter.plugin.common.PluginRegistry
Registrar registrarFor (@NonNull String pluginKey)
 
boolean hasPlugin (@NonNull String pluginKey)
 
< T > T valuePublishedByPlugin (@NonNull String pluginKey)
 
FlutterView createFlutterView (Context context)
 
FlutterNativeView createFlutterNativeView ()
 
boolean retainFlutterNativeView ()
 

Protected Member Functions

void onCreate (Bundle savedInstanceState)
 
void onDestroy ()
 
void onStart ()
 
void onStop ()
 
void onPause ()
 
void onPostResume ()
 
void onActivityResult (int requestCode, int resultCode, Intent data)
 
void onNewIntent (Intent intent)
 

Detailed Description

Deprecated class for activities that use Flutter who also require the use of the Android v4 Support library's FragmentActivity.

Applications that don't have this need will likely want to use FlutterActivity instead.

Important! Flutter does not bundle the necessary Android v4 Support library classes for this class to work at runtime. It is the responsibility of the app developer using this class to ensure that they link against the v4 support library .jar file when creating their app to ensure that FragmentActivity is available at runtime.

See also
https://developer.android.com/training/testing/set-up-project
Deprecated:
this class is replaced by io.flutter.embedding.android.FlutterFragmentActivity.

Definition at line 35 of file FlutterFragmentActivity.java.

Member Function Documentation

◆ createFlutterNativeView()

FlutterNativeView io.flutter.app.FlutterFragmentActivity.createFlutterNativeView ( )
inline

Implements io.flutter.app.FlutterActivityDelegate.ViewFactory.

Definition at line 66 of file FlutterFragmentActivity.java.

66 {
67 return null;
68 }

◆ createFlutterView()

FlutterView io.flutter.app.FlutterFragmentActivity.createFlutterView ( Context  context)
inline

Hook for subclasses to customize the creation of the FlutterView.

The default implementation returns null, which will cause the activity to use a newly instantiated full-screen view.

Implements io.flutter.app.FlutterActivityDelegate.ViewFactory.

Definition at line 61 of file FlutterFragmentActivity.java.

61 {
62 return null;
63 }

◆ getFlutterView()

FlutterView io.flutter.app.FlutterFragmentActivity.getFlutterView ( )
inline

Returns the Flutter view used by this activity; will be null before onCreate(Bundle) is called.

Implements io.flutter.view.FlutterView.Provider.

Definition at line 50 of file FlutterFragmentActivity.java.

50 {
51 return viewProvider.getFlutterView();
52 }

◆ hasPlugin()

final boolean io.flutter.app.FlutterFragmentActivity.hasPlugin ( String  key)
inline

Definition at line 76 of file FlutterFragmentActivity.java.

76 {
77 return pluginRegistry.hasPlugin(key);
78 }
boolean hasPlugin(@NonNull String pluginKey)

◆ onActivityResult()

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

Definition at line 141 of file FlutterFragmentActivity.java.

141 {
142 if (!eventDelegate.onActivityResult(requestCode, resultCode, data)) {
143 super.onActivityResult(requestCode, resultCode, data);
144 }
145 }
boolean onActivityResult(int requestCode, int resultCode, @Nullable Intent data)
std::shared_ptr< const fml::Mapping > data
Definition: texture_gles.cc:63

◆ onBackPressed()

void io.flutter.app.FlutterFragmentActivity.onBackPressed ( )
inline

Definition at line 103 of file FlutterFragmentActivity.java.

103 {
104 if (!eventDelegate.onBackPressed()) {
105 super.onBackPressed();
106 }
107 }

◆ onConfigurationChanged()

void io.flutter.app.FlutterFragmentActivity.onConfigurationChanged ( Configuration  newConfig)
inline

Definition at line 177 of file FlutterFragmentActivity.java.

177 {
178 super.onConfigurationChanged(newConfig);
179 eventDelegate.onConfigurationChanged(newConfig);
180 }

◆ onCreate()

void io.flutter.app.FlutterFragmentActivity.onCreate ( Bundle  savedInstanceState)
inlineprotected

Definition at line 91 of file FlutterFragmentActivity.java.

91 {
92 super.onCreate(savedInstanceState);
93 eventDelegate.onCreate(savedInstanceState);
94 }
void onCreate(Bundle savedInstanceState)

◆ onDestroy()

void io.flutter.app.FlutterFragmentActivity.onDestroy ( )
inlineprotected

Definition at line 97 of file FlutterFragmentActivity.java.

97 {
98 eventDelegate.onDestroy();
99 super.onDestroy();
100 }

◆ onLowMemory()

void io.flutter.app.FlutterFragmentActivity.onLowMemory ( )
inline

Definition at line 172 of file FlutterFragmentActivity.java.

172 {
173 eventDelegate.onLowMemory();
174 }

◆ onNewIntent()

void io.flutter.app.FlutterFragmentActivity.onNewIntent ( Intent  intent)
inlineprotected

Definition at line 148 of file FlutterFragmentActivity.java.

148 {
149 super.onNewIntent(intent);
150 eventDelegate.onNewIntent(intent);
151 }

◆ onPause()

void io.flutter.app.FlutterFragmentActivity.onPause ( )
inlineprotected

Definition at line 122 of file FlutterFragmentActivity.java.

122 {
123 super.onPause();
124 eventDelegate.onPause();
125 }

◆ onPostResume()

void io.flutter.app.FlutterFragmentActivity.onPostResume ( )
inlineprotected

Definition at line 128 of file FlutterFragmentActivity.java.

128 {
129 super.onPostResume();
130 eventDelegate.onPostResume();
131 }

◆ onRequestPermissionsResult()

void io.flutter.app.FlutterFragmentActivity.onRequestPermissionsResult ( int  requestCode,
String[]  permissions,
int[]  grantResults 
)
inline

Definition at line 134 of file FlutterFragmentActivity.java.

135 {
136 super.onRequestPermissionsResult(requestCode, permissions, grantResults);
137 eventDelegate.onRequestPermissionsResult(requestCode, permissions, grantResults);
138 }
boolean onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults)

◆ onStart()

void io.flutter.app.FlutterFragmentActivity.onStart ( )
inlineprotected

Definition at line 110 of file FlutterFragmentActivity.java.

110 {
111 super.onStart();
112 eventDelegate.onStart();
113 }

◆ onStop()

void io.flutter.app.FlutterFragmentActivity.onStop ( )
inlineprotected

Definition at line 116 of file FlutterFragmentActivity.java.

116 {
117 eventDelegate.onStop();
118 super.onStop();
119 }

◆ onTrimMemory()

void io.flutter.app.FlutterFragmentActivity.onTrimMemory ( int  level)
inline

Definition at line 166 of file FlutterFragmentActivity.java.

166 {
167 super.onTrimMemory(level);
168 eventDelegate.onTrimMemory(level);
169 }

◆ onUserLeaveHint()

void io.flutter.app.FlutterFragmentActivity.onUserLeaveHint ( )
inline

Definition at line 155 of file FlutterFragmentActivity.java.

155 {
156 eventDelegate.onUserLeaveHint();
157 }

◆ onWindowFocusChanged()

void io.flutter.app.FlutterFragmentActivity.onWindowFocusChanged ( boolean  hasFocus)
inline

Definition at line 160 of file FlutterFragmentActivity.java.

160 {
161 super.onWindowFocusChanged(hasFocus);
162 eventDelegate.onWindowFocusChanged(hasFocus);
163 }
void onWindowFocusChanged(boolean hasFocus)

◆ registrarFor()

final Registrar io.flutter.app.FlutterFragmentActivity.registrarFor ( String  pluginKey)
inline

Definition at line 86 of file FlutterFragmentActivity.java.

86 {
87 return pluginRegistry.registrarFor(pluginKey);
88 }
Registrar registrarFor(@NonNull String pluginKey)

◆ retainFlutterNativeView()

boolean io.flutter.app.FlutterFragmentActivity.retainFlutterNativeView ( )
inline

Hook for subclasses to indicate that the FlutterNativeView returned by createFlutterNativeView() should not be destroyed when this activity is destroyed.

Returns
Whether the FlutterNativeView is retained.

Implements io.flutter.app.FlutterActivityDelegate.ViewFactory.

Definition at line 71 of file FlutterFragmentActivity.java.

71 {
72 return false;
73 }

◆ valuePublishedByPlugin()

final< T > T io.flutter.app.FlutterFragmentActivity.valuePublishedByPlugin ( String  pluginKey)
inline

Definition at line 81 of file FlutterFragmentActivity.java.

81 {
82 return pluginRegistry.valuePublishedByPlugin(pluginKey);
83 }
< T > T valuePublishedByPlugin(@NonNull String pluginKey)

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