Q:

Android: webView app crashes

I have a webView app. Is a list of links to some tv online streaming channels. 
Some links are m3u8 and others are sop.
If I access a m3u8 link it opens in default media player, if i try to open the sop links, and I do not have SopCast Player installed, my app crashes, 
and I got the error below.
If I have installed SopCast Player, evetrything is ok.
I'm now with Android.
My files:
Manifest 
ManinActivity
Error:
android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=sop://111.175.143.195:3912/151638 }
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1409)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
at android.app.Activity.startActivityForResult(Activity.java:2827)
at android.app.Activity.startActivity(Activity.java:2933)
at com.example.tv.MainActivity$1.shouldOverrideUrlLoading(MainActivity.java:47)
at android.webkit.CallbackProxy.uiOverrideUrlLoading(CallbackProxy.java:239)
at android.webkit.CallbackProxy.handleMessage(CallbackProxy.java:346)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:130)
at android.app.ActivityThread.main(ActivityThread.java:3735)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:662)
at dalvik.system.NativeStart.main(Native Method)

Please, please, please, help me!!
Sorry for my english.

A:

In your shouldOverrideUrlLoading() you should replace startActivity(i); with
try {
  startActivity(i);
} catch (ActivityNotFoundException e) {
  // do what you want if appropriate app is not installed
}

