@@ -21,6 +21,7 @@ import android.graphics.Bitmap;
21import java.io.IOException;
21import java.io.IOException;
22import java.io.InputStream;
22import java.io.InputStream;
23import android.content.Intent;
23import android.content.Intent;
24+import android.content.ActivityNotFoundException;
25import java.nio.charset.StandardCharsets;
26import java.nio.charset.StandardCharsets;
@@ -79,7 +80,12 @@ public class MainWidget {
80 public boolean shouldOverrideUrlLoading(WebView view, String url) {
81 public boolean shouldOverrideUrlLoading(WebView view, String url) {
81 if( url != null && !url.startsWith("http://") && !url.startsWith("https://") && !url.startsWith("file://")) {
82 if( url != null && !url.startsWith("http://") && !url.startsWith("https://") && !url.startsWith("file://")) {
82− view.getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
84+ view.getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
86+ catch(ActivityNotFoundException e) {
87+ Log.e("reflex", "Starting activity for intent '" + url + "' failed!");
83 return true;
89 return true;
85 return false;
91 return false;