0

In Worklight 6.0, I can easily make phone call using: window.location="tel:12345679";
But in Worklight 6.2, this doesn't work. in Android it will throw an error:

Error: The protocal isn't supported.

I've tried adding the CALL_PHONE permission and add the below line to config.xml, but no luck:
<access origin="tel:*" launch-external="yes">

Anybody know how?

Idan Adar
  • 44,156
  • 13
  • 50
  • 89
RadeZ
  • 25
  • 3

1 Answers1

0

Change <access origin="*"/>
To <access origin="tel:*" launch-external="true">

Then, both of the below worked:

  • In the HTML: <a href="tel:+1-800-555-1234">call this number</a>,
  • In a function (for example, wlCommonInit()): document.location.href = "tel:+375292771265";

I'm using IBM Worklight Studio 6.2.0.01-20141015-1508 (latest version from the Eclipse Marketplace).

Related question: How to open the phone dialer?

Community
  • 1
  • 1
Idan Adar
  • 44,156
  • 13
  • 50
  • 89
  • same worklight version. but still no luck here. weird. CordovaWebViewClient.onReceivedError: Error code=-10 Description=The protocol isn't supported. URL=tel:10086 – RadeZ Oct 24 '14 at 09:20
  • still doesn't work. can you share your whole project to me? to let me have a try? thanks. my customer is pushing. – RadeZ Oct 25 '14 at 15:18
  • The only change I did in my project was alter native\res\xml\config.xml -- replaced the `` element with the one I mentioned in my answer. The only other "change" is the HTML from my answer as well. Here is the config.xml. Try again in a new project: http://pastebin.com/S03pPXvg – Idan Adar Oct 25 '14 at 15:43
  • Thanks Idan, the key is to remove the original line. thank you very much. – RadeZ Oct 28 '14 at 00:54