Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions shell/platform/android/io/flutter/app/FlutterActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,12 @@ protected void onCreate(Bundle savedInstanceState) {
eventDelegate.onCreate(savedInstanceState);
}

@Override
protected void onStart() {
super.onStart();
eventDelegate.onStart();
}

@Override
protected void onResume() {
super.onResume();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,13 @@ public void onPause() {
}
}

@Override
public void onStart() {
if (flutterView != null) {
flutterView.onStart();
}
}

@Override
public void onResume() {
Application app = (Application) activity.getApplicationContext();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public interface FlutterActivityEvents
*/
void onPause();

/**
* @see android.app.Activity#onStart()
*/
void onStart();

/**
* @see android.app.Activity#onResume()
*/
Expand Down
4 changes: 4 additions & 0 deletions shell/platform/android/io/flutter/view/FlutterView.java
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,10 @@ public void addActivityLifecycleListener(ActivityLifecycleListener listener) {
mActivityLifecycleListeners.add(listener);
}

public void onStart() {
mFlutterLifecycleChannel.send("AppLifecycleState.inactive");
}

public void onPause() {
mFlutterLifecycleChannel.send("AppLifecycleState.inactive");
}
Expand Down