In WebviewActivity the shouldOverrideUrlLoading handler sends any link that is not a WhatsApp URL to an external app with startActivity(new Intent(Intent.ACTION_VIEW, url)). There is no guard around that call, so when the device has no app registered for the link the app crashes with ActivityNotFoundException.
This is easy to hit from a chat. A tel: number, or a link with a scheme the phone cannot open, is enough to bring the app down when nothing handles it.
Catching the failure and showing a short message would keep the app running. WhatsApp Web links keep loading in the WebView as before.
In
WebviewActivitytheshouldOverrideUrlLoadinghandler sends any link that is not a WhatsApp URL to an external app withstartActivity(new Intent(Intent.ACTION_VIEW, url)). There is no guard around that call, so when the device has no app registered for the link the app crashes withActivityNotFoundException.This is easy to hit from a chat. A
tel:number, or a link with a scheme the phone cannot open, is enough to bring the app down when nothing handles it.Catching the failure and showing a short message would keep the app running. WhatsApp Web links keep loading in the WebView as before.