Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Back gesture on Android 12+ kills app rather than backgrounding it #117061

@moneytoo

Description

@moneytoo

Steps to Reproduce

  1. Execute flutter run on any code sample (e.g. the Starter app) and launch the app on Android 12 or 13 device
  2. Press system back button
  3. Relaunch the app from device launcher

Expected results:

Starting with Android 12, pressing back button on launcher activities should not destroy activities. The app should stay in warm state, similar to when exiting using home button. Any other app running Android 12/13 and not overriding onBackPressed() (or overriding correctly) works like that.

See Root launcher activities are no longer finished on Back press in https://developer.android.com/about/versions/12/behavior-changes-all#back-press

Actual results:

Pressing back button destroys the app. The app shows a splashscreen on the subsequent launch and does not retain any state.

In my opinion, this degrades the user experience, comparing to other native apps.

Code sample

Any Flutter sample, e.g. flutter create xyz

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projecte: OS-version specificAffects only some versions of the relevant operating systemengineflutter/engine related. See also e: labels.found in release: 3.3Found to occur in 3.3found in release: 3.7Found to occur in 3.7has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyteam-androidOwned by Android platform teamtriaged-androidTriaged by Android platform team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions