Did you see @emaV post? Try whitelisting telephone numbers
Thanks⌠Iâll take a look!
Hi @henkjurriens I have the same problem.
Try this:
<div onclick="window.open('tel:555-555-555', '_system', 'location=yes')"></div>
And you need the Cordova plugin InAppBrowsing
Itâs really helpful to me! Thanks a lot!
Thanks guys!!
worked for me after adding the following two lines to config.xml
access origin=âtel:" launch-external=âyesâ
access origin="mailto:â launch-external=âyesâ
didnât work with
access origin=â*â
Well, Iâm running Cordova .4.0.0
I have the same problem and my first thought is something wrong with the Androidâs Webview. After many hours pulling my hair, I end up modify the CordovaCallNumberPlugin follow the answer on StackOverflow (How do I get the dialer to open with phone number displayed?)
But emaVâs answer is more bulletproof and should be recommended.
Thanks a Lot @emaVâŚ
I just had to thank you again, as the relief your answer caused was immense.
I have been struggling since hours. But the issue just got sorted with your reply.
I know everyone does, but here I go again.
Thank you for pointing this out, been googling for almost an hour!
Hey guys,
I have been following all of your steps and i am so close, thanks to all your suggestions. I am having trouble getting the phone number to dislplay on my andriod . I have used all the codes and suggestions. This is what i have included;
In index.html
(403)314-0607
In index.js
$scope.phoneno = â4033140607â
.controller(âHomeTabCtrlâ, function($scope) {
console.log(âHomeTabCtrlâ);
});
In config.xml
So on my android, my button opens up my phone but doesnât display the phone number. Any suggestions would be appreciated. Thanks
-chris
my code in html
a class=âbutton icon-left ion-ios-telephone button-full button-positiveâ ng-href=âtel:{{phoneno}}â>(403)314-0607
also,
my code in config.xml
access origin=âtel:" launch-external="yes"
access origin="mailto:â launch-external=âyesâ
Not sure if anyone on this thread has stumbled onto this android bug but androids support for tel: has a problem that doesnt happen on IOS. The issue is that if you want to add more characters or pauses after the phone number is dialed, android ignores the digits. IOS will go ahead and use them but Android doesnt. I ended up writing a android plugin to deal with this . https://github.com/chalettu/dialer-plugin it uses a lower level telephony api in android that will properly handle the extra digits.
I did it but still facing the issue.
Ionic CLI Version: 1.3.18 Ionic version 1.0.0-rc.2 Cordova version: 3.8.0
Can anybody please help?
Have you whitelisted it in your angular config?
$compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|geo|mailto|tel|chrome-extension):/);
thank you yurinondual,
no! Iâm writing my first Ionic app so everything is new.
Iâm not sure how to add it, just tried the following:
.config(function($compileProvider){ $compileProvider.aHrefSanitizationWhitelist(/^\s*(https?|ftp|geo|mailto|tel|chrome-extension):/); })
but I get the following errors in the iOS simulator console:
CDVWebViewDelegate: Navigation started when state=1 Failed to load webpage with error: CDVWebViewDelegate: Navigation started when state=1 Failed to load webpage with error: The URL canât be shown
btw, this is the code I use:
<a class="tab-item" href="#" onclick="window.open('tel:0039340123456')"><i class="icon ion-ios-telephone-outline"></i></a>
You donât need window.open. My url looks liek this:
<a ng-href="tel:{{ ::vm.article.tel}}" class="col button button-icon icon ion-android-call"></a>
<a class="tab-item" href="tel:0039340123456"><i class="icon ion-ios-telephone-outline"></i></a>
same problem:
Failed to load webpage with error: The URL canât be shown