0
When I click open in the instagram app in my app. My webview gives the following error:
Web page not available
Unable to upload web page to address Intent://instagram.com/_u/hotelcolonialdosnobres/#Intent;package=com.instagram.androi;Scheme=https;end
net::ERR_UNKNOWN_URL_SCHEME
In my webview I have this responsible function
webView.setWebViewClient(new WebViewClient(){
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
// try{ url != null &&
if (url.startsWith("http://www.hotelcolonialdosnobres.com/")) {
view.loadUrl(url);
return true;
}
if (url.startsWith("mailto:") ||url.startsWith("intent://") || url.startsWith("market://") ){
try {
final Intent intent = new Intent(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
final Activity host = (Activity) view.getContext();
host.startActivity(intent);
return true;
}catch (ActivityNotFoundException e) {
// Google Play app is not installed, you may want to open the app store link uri.getQuery())
// Uri uri = Uri.parse(url);
view.loadUrl(url);
return false;
}
}
return false;
}
});
How to troubleshoot this error so it can open ?
But that code won’t work if I press to open facebook
– Fabio Nobre