Skip to content

[shared engine] Consider letting developers take over life cycle events in add-to-app scenarios if they want #94702

@ColdPaleLight

Description

@ColdPaleLight

The current life cycle of AppLifecycleState is associated with the life cycle of FlutterActivity/FlutterViewController.
It seems that because we did not consider the add-to-app scenario when it was originally designed.

But in an add-to-app scenario, this may not work. This is because the application may have multiple FlutterViewController/FlutterActivity, and they share one FlutterEngine.

The wrong setting of AppLifecycleState may cause the frame to fail to be scheduled and rendered correctly.

So I guess we can provide a option to developers to let them take over life cycle events if they want. If so, flutter will no longer send life cycle events, but let developers send life cycle events themselves.

related issue:
#52456

/cc @gaaclarke @blasten

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: new featureNothing broken; request for a new capabilitycustomer: alibabaengineflutter/engine related. See also e: labels.platform-androidAndroid applications specificallyplatform-iosiOS applications specificallyteam-engineOwned by Engine teamtriaged-engineTriaged by Engine team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions