Comments (5)
Original message:
I've been looking into issues and I have seen this one:
https://issues.apache.org/jira/browse/CB-8180
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);
intent.setData(Uri.parse(url));
cordova.getActivity().startActivity(intent);
} catch (android.content.ActivityNotFoundException e) {
LOG.e(LOG_TAG, "Error dialing " + url + ": " + e.toString());
}
}
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 shouldOverrideUrlLoading?
from cordova-discuss.
@agrieve answer:
shouldOverrideUrlLoading is what the main cordova webview uses, so that's
certainly the right approach. I believe it should also add
CATEGORY_BROWSABLE to the intent to ensure that the user is prompted to
confirm whether they actually want to make the call.
from cordova-discuss.
The issue has been now assigned to @infil00p and on his comment on the issue he said:
This will probably be discussed on the list.
But I don't remember seeing this discussed on the mail list appart from my mail.
from cordova-discuss.
I asked what this should do in the ideal case. It should be in
InAppBrowser's shouldOverrideUrlLoading. Like most of our plugins, I kinda
want to re-write it all, but doing that just shows that I don't know what's
going on with this plugin. I think there's two issues that are directly
related to what you just talked about on this.
On Mon, Jun 22, 2015 at 1:44 PM Julio César [email protected]
wrote:
The issue has been now assigned to @infil00p https://github.com/infil00p
and on his comment on the issue he said:
This will probably be discussed on the list.But I don't remember seeing this discussed on the mail list appart from my
mail.—
Reply to this email directly or view it on GitHub
#10 (comment)
.
from cordova-discuss.
The issue was resolved long time ago, closing...
from cordova-discuss.
Related Issues (20)
- [cordova-create] New logic for setting attributes in package.json & config.xml (§3) HOT 2
- [cordova-create] Fix event delegation (§4) HOT 4
- [cordova-create] Do not copy "missing" files from default template (§5) HOT 1
- [cordova-create] Reduce supported template layouts (§7) HOT 1
- [cordova-create] Drop support for linking (§8) HOT 1
- [cordova-windows] dealing with template/Properties/Default.rd.xml HOT 2
- TEst HOT 1
- Migrate issues to GitHub PLEASE HOT 1
- Where to report plug-in issues? HOT 1
- Breaking changes in cordova-create HOT 9
- Do not assert Apache license on generated projects HOT 1
- Merge cordova-app-hello-world and cordova-template-reference HOT 3
- Archive deprecated repos HOT 2
- Reduce JIRA issue count HOT 3
- Introduce stale bot on GitHub
- cordova-serve release needed from master HOT 8
- Rename "osx" platform in a major release? HOT 4
- JavaScript improvements for a major release
- Cordova coho "tools release" a bit confusing HOT 6
- [cordova-create] Simplify interface of main export (§1) HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cordova-discuss.