Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

How to make a Phone Call with WRT

From Wiki
Jump to: navigation, search
Article Metadata
Article
Created: jzferreira (06 Jul 2009)
Last edited: hamishwillee (26 Jul 2012)

With WRT you can get all contacts and send a SMS, but is it possible to make phone call instead of send a message? Yes, it's possible. You just need to use the tel protocol.

HTML Example

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Phone Call</title>
<script type="text/javascript" language="javascript" src="phonecall.js">
<script type="text/javascript" language="javascript">
 
window.onload = function() {
 
call();
 
}
 
</script>
 
</head>
<body>
<ul>
<li id='telephone'>+559255555555</li>
</ul>
</body>
</html>

Javascript Code (phonecall.js)

function call() {
 
var doc = document;
var div = doc.getElementById('telephone');
var value= div.innerHTML;
 
widget.openURL("tel:"+value);
 
}

Suggestion

If you want improve this example, you can get all contact from your device, shows in the page and add click event to do the phone call.

This page was last modified on 26 July 2012, at 02:59.
29 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×