incubator-callback-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shazron Abdullah (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CB-1213) Calling phone numbers with the tel: URI scheme from JS doesn't work
Date Wed, 08 Aug 2012 19:38:20 GMT
Shazron Abdullah created CB-1213:
------------------------------------

             Summary: Calling phone numbers with the tel: URI scheme from JS doesn't work

                 Key: CB-1213
                 URL: https://issues.apache.org/jira/browse/CB-1213
             Project: Apache Cordova
          Issue Type: Bug
          Components: iOS
    Affects Versions: Master
            Reporter: Shazron Abdullah
            Assignee: Shazron Abdullah


Discussion: https://groups.google.com/d/topic/phonegap/w2E7WOnhgiw/discussion

Calling phones from Javascript (using window.location) and the tel: URI scheme doesn't seem
to be working on iPhone devices with apps packaged by PhoneGap Build, so the issue must be
in the PhoneGap framework.
They work alright when the app is loaded as a web app through Safari, but when it runs as
a native app (where the phonegap.js file is loaded), they don't work anymore, no errors or
alerts are displayed, it just doesn't do anything.

Here's the code I use:

function CallPhone(sPhoneNumber){
sPhoneNumber = sPhoneNumber.replace(/[^0-9]/g, "");
window.location = "tel:" + sPhoneNumber;
};

To try it out, just call the function when a button or link is clicked. I'm using Sencha Touch
v2 to develop the app. You can also try changing the URI scheme to be "tel://" instead of
just "tel:" but it will not work also. I'd like to reiterate that this code works perfectly
when opening the app through Safari from a URL I uploaded the app to, but not when running
it as a packaged PhoneGap app (using PhoneGap Build).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message