-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Closed
flutter/engine
#41094Closed
Copy link
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressioncustomer: vroomframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyAndroid applications specifically
Description
Method didChangeAppLifecycleState of WidgetsBindingObserver for iOS gets called reliably, for Android missing callbacks for entering App Switcher and App start.
Steps to Reproduce
- Execute
flutter runon the code sample for Android device - Wait for app to load on a screen
- Swipe from bottom to show App Switcher
- Tap App UI to go back to the app
Expected results:
didChangeAppLifecycleState function gets called as it is for iOS
(e.g. two calls - one with AppLifecycleState.inactive, one with AppLifecycleState.resumed parameter)
Actual results:
No calls to didChangeAppLifecycleState happen.
The same for App start - no calls to didChangeAppLifecycleState.
@gspencergoog could you please have a look?
Kind regards,
AG
Code sample
class _ScreenWidgetState extends State<ScreenWidget> with WidgetsBindingObserver {
@override
void initState() {
super.initState();
WidgetsBinding.instance.addObserver(this);
}
@override
void dispose() {
super.dispose();
WidgetsBinding.instance.removeObserver(this);
}
@override
void didChangeAppLifecycleState(AppLifecycleState state) async {
...
}
}
Logs
T-Davis and stefanschaller
Metadata
Metadata
Assignees
Labels
P0Critical issues such as a build break or regressionCritical issues such as a build break or regressioncustomer: vroomframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.platform-androidAndroid applications specificallyAndroid applications specifically