cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From julio cesar sanchez <>
Subject [proposal] [ANDROID] move inAppBrowser intents from onPageStarted to shouldOverrideUrlLoading
Date Thu, 02 Apr 2015 23:07:08 GMT
I've been looking into issues and I have seen this one:

Right now the code to handle the tel links is inside the onPageStarted

if (url.startsWith(WebView.SCHEME_TEL)) {
                try {
                    Intent intent = new Intent(Intent.ACTION_DIAL);
                } catch (android.content.ActivityNotFoundException e) {
                    LOG.e(LOG_TAG, "Error dialing " + url + ": " +

But the problem is, it launchs the intent and try to open the web page, so
when you come back from the intent you see a "couldn't load the url" page
on the app.

I've tried to use the view.stopLoading() but it doesn't seem to stop it.
The issue only talks about the tel links, but I suppose that will happen
with sms, mailto and some other links.

So, I think a solution might be to move that code to
shouldOverrideUrlLoading function.

Is there any reason of doing this on the onPageStarted instead of using the

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message