- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In older XDK releases I used such JS code:
var phonenumber = "+71234567890";
window.location.href = "tel:" + phonenumber;
and it worked perfect.
Now It is not work. How to realize phone call now? (I build only IOS version)
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello A.B
Here is a nice article about how to make phone call from the Ionic Forums https://forum.ionicframework.com/t/making-phone-call-from-app-href-tel-123/1968/13
It show some Ionic specific code there, but it should work with standard HTML code as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Probably needs some whitelist rules, see this doc page > https://software.intel.com/en-us/xdk/docs/using-cordova-whitelist-rules-with-intel-xdk
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes! I did it.
Thanks for your links.
For dummies like me - do these actions:
1. In index.html add:
<meta http-equiv="Content-Security-Policy" content="default-src 'self' 'unsafe-eval' data: blob: filesystem: ws: gap: file: cdvfile: https://ssl.gstatic.com *; style-src * 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'; img-src * data: 'unsafe-inline'; connect-src * 'unsafe-inline'; child-src *; ">
2. In Project tab - Build settings - Whitelist add: tel:* in Intent (<allow-intent>) and in Navigation (<allow-navigation>)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page