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.
WebPageFragmentshows a page in a WebView, and itsFragmentViewClient.shouldOverrideUrlLoadingsends every link that is not the home page to an external app withstartActivity(Intent(Intent.ACTION_VIEW, url)). The call is not guarded, so a link that no installed app can open throwsActivityNotFoundExceptionand 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.