Skip to content

Duplicate app instances in Recents [Android] #635

@mohdfaiezuan-wq

Description

@mohdfaiezuan-wq

The Flutter template ships MainActivity with this default in AndroidManifest.xml:

android:taskAffinity=""

This is Flutter's mitigation for the StrandHogg vulnerability and has been the default for new projects for a while.

Because MainActivity has an empty task affinity while the Intercom SDK's activities (e.g. IntercomRootActivity) declare none — so they inherit the package-name affinity — Android places the Intercom messenger in a separate task. The result: after opening the messenger, two instances of the app appear in the Recent Apps screen, one for the Flutter activity and one for the Intercom UI.

Expected : One app entry in Recents
Actual : Two app entries in Recents

Removing android:taskAffinity="" makes the duplication go away, but that reopens the StrandHogg vulnerability, so it isn't a real option.

I have create a repo to clone and replicate issue on new init flutter project in here https://github.com/mohdfaiezuan-wq/init_flutter_intercom

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions