webView.getSettings().setJavaScriptEnabled(true);
webView.addJavascriptInterface(
new PhotoStorage(this),
"PhotoStorage"
);
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (
Uri.parse(url).getHost().contains("sonyagent") ||
(Uri.parse(url).getPort() == 3000)
){
return false;
}
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(intent);
return true;
}