Package io.flutter.app
Interface FlutterActivityEvents
- All Superinterfaces:
ComponentCallbacks
,ComponentCallbacks2
,PluginRegistry.ActivityResultListener
,PluginRegistry.RequestPermissionsResultListener
- All Known Implementing Classes:
FlutterActivityDelegate
public interface FlutterActivityEvents
extends ComponentCallbacks2, PluginRegistry.ActivityResultListener, PluginRegistry.RequestPermissionsResultListener
A collection of Android
Activity
methods that are relevant to the core operation of
Flutter applications.
Application authors that use an activity other than FlutterActivity
should forward all
events herein from their activity to an instance of FlutterActivityDelegate
in order to
wire the activity up to the Flutter framework. This forwarding is already provided in
FlutterActivity
.
-
Field Summary
Fields inherited from interface android.content.ComponentCallbacks2
TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN
-
Method Summary
Modifier and TypeMethodDescriptionboolean
Invoked when the activity has detected the user's press of the back key.void
void
void
onNewIntent
(Intent intent) void
onPause()
void
void
onResume()
void
onStart()
void
onStop()
void
void
onWindowFocusChanged
(boolean hasFocus) Methods inherited from interface android.content.ComponentCallbacks
onConfigurationChanged, onLowMemory
Methods inherited from interface android.content.ComponentCallbacks2
onTrimMemory
Methods inherited from interface io.flutter.plugin.common.PluginRegistry.ActivityResultListener
onActivityResult
Methods inherited from interface io.flutter.plugin.common.PluginRegistry.RequestPermissionsResultListener
onRequestPermissionsResult
-
Method Details
-
onCreate
- Parameters:
savedInstanceState
- If the activity is being re-initialized after previously being shut down then this Bundle contains the data it most recently supplied inonSaveInstanceState(Bundle)
.- See Also:
-
onNewIntent
- Parameters:
intent
- The new intent that was started for the activity.- See Also:
-
onPause
void onPause()- See Also:
-
onStart
void onStart()- See Also:
-
onResume
void onResume()- See Also:
-
onPostResume
void onPostResume()- See Also:
-
onDestroy
void onDestroy()- See Also:
-
onStop
void onStop()- See Also:
-
onBackPressed
boolean onBackPressed()Invoked when the activity has detected the user's press of the back key.- Returns:
true
if the listener handled the event;false
to let the activity continue with its default back button handling.- See Also:
-
onUserLeaveHint
void onUserLeaveHint()- See Also:
-
onWindowFocusChanged
void onWindowFocusChanged(boolean hasFocus) - Parameters:
hasFocus
- True if the current activity window has focus.- See Also:
-