Skip to content

Handle ActivityNotFoundException in the url_launcher plugin #66826

@jeroen1602

Description

@jeroen1602

Use case

According to the Android documentation there is a chance for a call to startActivity() can throw a ActivityNotFoundException.

Currently the launch function doesn't handle this exception.

Proposal

My proposal is to add an extra LaunchStatus to the Android launch function that is returned if the ActivityNotFoundException exception occurs.

Using this the new state can be handled in the onLaunch handler and a new error state can be returned.

Using ftp://localhost should cause the exception in an emulator.

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: qualityA truly polished experiencec: proposalA detailed proposal for a change to Flutterp: url_launcherPlugin to launch external applicationspackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions