Skip to content

Crash when an external link cannot be opened by any app #575

Description

@jim-daf

WebPageFragment shows a page in a WebView, and its FragmentViewClient.shouldOverrideUrlLoading sends every link that is not the home page to an external app with startActivity(Intent(Intent.ACTION_VIEW, url)). The call is not guarded, so a link that no installed app can open throws ActivityNotFoundException and crashes the app.

On a device with no browser, or with a link whose scheme nothing handles, tapping the link closes the app.

Catching the failure and showing a short message would keep the app running. Links still open in their app when one is available.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions