-1

I have to call small phone number with only two digits, when I click on a specific view. This is working well in Android, but this doesn't work on ios6 and 7. By the way, this is working fine with 3 digits.

This is the function I call on click :

$.callView.addEventListener('click', function(e) {
    Ti.Platform.openURL('tel:18'); 
});

This give me that error : <Warning>: Ignoring unsafe request to open URL tel:18 <Warning>: LaunchServices: application launch failed - received error code 12

I've seen some pieces of answer in this ticket, but it's not related to Titanium.

I've tried to call Ti.Platform.openURL like that :

  • tel://18?1
  • tel:18?1
  • tel:18#1
  • tel:+18?1
  • tel:+18#1

But none of theese things works. Have you an idea of what I have to do to make this call ?

Thanks

Community
  • 1
  • 1
Audrey
  • 66
  • 4

1 Answers1

0

You can try appending a pause as in tel:18p. This will show up as 18, which you might not like, but this looks like a long standing issue with Apple, so a fix doesn't appear imminent.

Yimin Rong
  • 1,890
  • 4
  • 31
  • 48
  • Thank you for your answer, but I have already try to use `tel:18p`. The problem is when I do that, and click on the button, it opens the phone, but the number is `187` instead of `18,`. It looks like ios transform the "p" character with the equivalent number "7". In one word, I'm steel looking for an answer to this problem... – Audrey Nov 27 '13 at 20:03
  • Telephony requires a pause command of some sort. It's a matter of finding what it maps to. It might be as simple as using a comma. – Yimin Rong Nov 28 '13 at 18:39
  • People have had success using `tel:18;18`. I think the correct format would be something like this: `tel:18;phone-context=+2125551234`. – Yimin Rong Nov 29 '13 at 14:27
  • The latest solution works for me : `tel:18;18`, thanks. It calls the good number, but for you to know, it writes "18;18" on the phone screen. – Audrey Nov 29 '13 at 15:30