Software Archive
Read-only legacy content
17061 Discussions

Make a dial without dialer screen

Antonio_A_
Beginner
583 Views

Hi all, 

I'm working on an application that has to call a number in certain cases (for domotic purposes). The number dialing must be transparent for the user, so the dialer screen must not be shown and the call start automatically.

I'm using this syntax: document.location.href = 'tel: xxxxxxxxxxxx'. Is there a way to bypass the dialer screen?

 

thanks

Antonio

 

0 Kudos
10 Replies
Diego_Calp
Valued Contributor I
583 Views

Hello,

May be this plugin helps you:

https://github.com/Rohfosho/CordovaCallNumberPlugin

Regards,

Diego

0 Kudos
Antonio_A_
Beginner
583 Views

Thank you, Diego,

I see this parameter in the documentation

bypassAppChooser: boolean; true if you always wish to bypass the app chooser if user has multiple applications installed that can handle calls

In your opinion, should it do what I need?

 

0 Kudos
Diego_Calp
Valued Contributor I
583 Views

Hi Antonio,

Seems that you neet to set the parameter to true to avoid the app offering options to select which app will dial the number. I supose that in that case will go to device phone dialing.

Sorry, I didn't use this plugin, I was aware of it because a search I did some time ago.

Regards,

Diego

 

0 Kudos
Antonio_A_
Beginner
583 Views

Yes, I suppose the same. So, that doesn't help for what I have to do. I fear it's something I can't do with XDK.

0 Kudos
PaulF_IntelCorp
Employee
583 Views

Antonio -- you cannot bypass the dialing screen due to restrictions in Android (and iOS and other systems). This has nothing to do with the XDK and it is not something we can control. For security reasons, only "trusted apps" are allowed to initiate a phone call or an SMS, etc. If you have a "rooted" device you can get around that restriction, but it is not what you should expect of a typical user's device (to be rooted).

0 Kudos
Antonio_A_
Beginner
583 Views

Ok, Paul, I see, but what do you mean with "trusted apps"?

 

0 Kudos
Antonio_A_
Beginner
583 Views

Another question: I found a Cordova Plugin (for Phonegap) that should

"enable PhoneGap apps on the iPhone and Android platforms to dial a phone number without requireing additional user interaction (such as the 'Call / Cancel' popup that ordinarilly would occur when using window.location.href = "tel:2125551212"".

here's the URL web page:

https://www.npmjs.com/package/cordova-plugin-phonedialer

What do you thinka about that? Could it work? With XDK?

thanks again

Antonio

0 Kudos
PaulF_IntelCorp
Employee
583 Views

Antonio -- you can certainly give it a try. The XDK creates standard Cordova apps, so Cordova and PhoneGap plugins will work with the XDK, unless they include gradle scripts or hooks (which we hope to fix in a future build system release). That plugin is quite old (by Cordova standards) so it may or may not work (not because of the XDK but because of changes in Cordova in the past two years). Certainly worth trying out to see if it works. I suspect it will bring up the dialing screen with the number filled in, but the user will likely still have to push the "dial" button.

0 Kudos
Antonio_A_
Beginner
583 Views
I've tried. It works! The dialer screen is not shown when the app dials the number.
0 Kudos
PaulF_IntelCorp
Employee
583 Views
0 Kudos
Reply