- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to dial/call from apk i want from a button get into the dial of the phone whit a number ready to call.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There are a variety of solutions, please "google" for "plugin to dial telephone cordova"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Paul,
I know this is a year late, but I was trying to solve the same problem today and your your google advice sent me in just the right direction.
This thread in StackOverflow in particular is a great solution using inappbrowser.
http://stackoverflow.com/questions/19639663/cordova-trying-to-dial-telephone-number
Leads to:
obj.public_phone is a value in a JSON object and the js is creating a string (out for output) that is passed to a <div> in html for display:
if (obj.public_phone.length > 0){out += 'Call: <br><button class="btn widget uib_w_22 d-margins btn-xs btn-primary" '; out += 'data-uib="twitter%20bootstrap/button" data-ver="1" '; out += 'onclick= "placeCall(\'' + obj.public_phone + '\')">' + obj.public_phone + '</button><br>';}
later in app.js:
function placeCall(num) { cordova.InAppBrowser.open('tel:' + num.replace(/\(|\)|\ |\-/g,''), '_system'); };
Simple, elegant, and uses inappbrowser in a way I would never have thought of. BEAUTIFUL!
Ed
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page