Software Archive
Read-only legacy content
17061 Discussions

Intel XDK 3088 CLI 5.4.1 - external open tel:* does not work

Dmitriy_I_
New Contributor I
866 Views

Hello, dear Sirs.

After migrating to new Intel XDK my ios build stoped to open push "Call Cell":

I have done a lot of things:

1. tried to add

    <access origin="tel:*" launch-external="yes"/>
    <allow-intent href="tel:*" />
    <allow-navigation href="tel:*" />

    at intelxdk.config.additions.xml

2. instead of using javascript code:

document.location.href = "tel:" + number;

     i tried: 

if (window.cordova)
            cordova.InAppBrowser.open('tel:' + number, '_system');

3. Also I tried to switch different options:

 

Please help to make call to cell on ios platform as before in Intel XDK 2893

0 Kudos
1 Solution
Dmitriy_I_
New Contributor I
866 Views

The problem is solved.

In new Intel XDK 3088, when you build ios app, you have to put in "Navigation" field the same access option as in "Intent".

If you put options only in "Intent" - it does not work!

View solution in original post

0 Kudos
12 Replies
Amrita_C_Intel
Employee
866 Views

Please change the CLI version from 5.4.1 to 5.1.1. See if it works.

Initially were you using any plugin instead of HTML?

 

0 Kudos
Dmitriy_I_
New Contributor I
866 Views

Amrita C. (Intel) wrote:

Please change the CLI version from 5.4.1 to 5.1.1. See if it works.

Initially were you using any plugin instead of HTML?

I used only cordova device and had the same result.

I downgraded to 5.1.1 and I have the same result.

What can I do more?

I use real device - always remove old version and install new one.

0 Kudos
Amrita_C_Intel
Employee
866 Views

Can you send the .zip file of your project via send author a message located in the right side of your comment?

0 Kudos
Swati_S_Intel1
Employee
866 Views

@Dmitry,

You need to add tel:* in the intent whitelist. What you've shown in the screenshot is correct. You do not need to add anything in the intel.xdk.additions.xml file. 

document.location.href = "tel:" + number; should work just fine, and so does Cordova CLI 5.4.1.

There have been some changes in the Cordova container and whitelisting rules, but I just checked on my iPhone 6s running iOS 9 and works fine.

Which version of iOS are you using? 

0 Kudos
Dmitriy_I_
New Contributor I
866 Views

SWATI S. (Intel) wrote:

@Dmitry,

You need to add tel:* in the intent whitelist. What you've shown in the screenshot is correct. You do not need to add anything in the intel.xdk.additions.xml file. 

document.location.href = "tel:" + number; should work just fine, and so does Cordova CLI 5.4.1.

There have been some changes in the Cordova container and whitelisting rules, but I just checked on my iPhone 6s running iOS 9 and works fine.

Which version of iOS are you using? 

I tested with ios 9.3 iPad 4 Wifi+4G

But I do not test via intel XDK test app. I install it right from itunes.

I created blank project and put 1 button with document.location.href = "tel:777777777" and in emulator I see what skype opens and on device nothing happens.

I'd like to note that version of my product app in itunes open "tel:*" on the same version of iPad 4 with ios 9.3, but that version was built with Intel XDK 2893

0 Kudos
Dmitriy_I_
New Contributor I
866 Views

Please help!

0 Kudos
Dmitriy_I_
New Contributor I
867 Views

The problem is solved.

In new Intel XDK 3088, when you build ios app, you have to put in "Navigation" field the same access option as in "Intent".

If you put options only in "Intent" - it does not work!

0 Kudos
PaulF_IntelCorp
Employee
866 Views

Dmitriy -- thanks for that update. We suspect this is a Cordova bug, our Cordova expert is investigating.

0 Kudos
Swati_S_Intel1
Employee
866 Views

Dimitry, You do not need to put anything in the Navigation in order for Intent requests to work. Please check again. I had tried before I posted you the reply earlier. You need to put tel:* etc. in "intent" whitelist. And once again you do not need to put anything in Navigation unless you have a navigation whitelist requirement in your app.

 

0 Kudos
Dmitriy_I_
New Contributor I
866 Views

@SWATI S

I don't understand why you tell twice info ignoring my message?

As I said I can repeat: unless you put  tel:* in Navigation option you will not be able to call from your app!

P.S.: ios 9.3 ipad4

0 Kudos
Nikita_V_
Beginner
866 Views

Dmitriy I. wrote:

The problem is solved.

In new Intel XDK 3088, when you build ios app, you have to put in "Navigation" field the same access option as in "Intent".

If you put options only in "Intent" - it does not work!

 

Hello there,

Yes, you are right Dmitriy. In Intel XDK 3088, to run application using 'Debug', we just need to set 'Intent' to 'tel:*' but to make Build of same app we need to set both Intent and Navigation to 'tel:*' 

 

0 Kudos
PaulF_IntelCorp
Employee
866 Views

An FYI for anyone reading this thread, please read the following post.

The following commentary is based on an example that is specific to iOS whitelisting. Unfortunately, the Cordova whitelisting behavior is unique to each platform (Android, iOS, Windows, etc.) and cannot be easily generalized.

Due to the nature of Cordova’s whitelisting features, there are many edge cases and subtleties. This makes it difficult to provide accurate high-level guidance – any whitelist guidance is likely to have important details omitted that are relevant to specific cases. The exact configuration and implementation details are important in order to understand whitelisting behavior. When it comes to whitelisting, one must be cautious about high-level generalizations, as this case illustrates.

Based on this thread, the app is configured with the following whitelist entry:

<allow-intent href="tel:*" />

The expectation is this will allow all "tel:" URIs to work (specifically on iOS, in this example).

In the test app, the developer mentions that they “hooked up a button” to test this but it did not work until they added an ‘allow-navigation’ directive. Given this description, it is possible to reproduce this behavior, as follows:

Although it is not documented, the implementation of the cordova-ios@4.1.0 (aka Intel XDK CLI 5.4.1) whitelist only applies the allow-intent directives to click events on anchor tags using an href to reference the tel: URI. That is, something like the following will work:

<a id="tel-a" href="tel:777777777">start telephone call with an "a.href" action</a>

However, the following examples will NOT work:

<a id="tel-a-onclick" onclick="document.location.href='tel:777777777';">start telephone call with an "a.onclick" action</a>

<button id="tel-button" onclick="document.location.href='tel:777777777;'">start telephone call with a "button.onclick" action</button>

This is because the intent whitelist is only being applied to anchor tag clicks. Therefore, although tel:* is whitelisted and these are tel:* intent requests, they will not be allowed because the intent whitelist is only being applied to requests originating from anchor tags using an href declaration for the tel: intent.

As noted in the thread, adding an allow-navigation directive enables all of the above examples to work (with the side-effect that the allow-intent directive is then NOT required).

The particular Cordova whitelist bug described here was fixed in August, 2016 in the cordova-ios platform framework code. However, that fix will likely not be "live" in the Intel XDK build system until later in the year.

 

0 Kudos
Reply