View Sidebar
SMS, Email, Call from PhoneGap Mobile Application

SMS, Email, Call from PhoneGap Mobile Application

February 21, 2014 15:13

Often we require to share content (Email or SMS ) from a mobile application. When developing applications using PhoneGap framework you can trigger the default application of the OS to perform these operations.

 

//Call Phone
//window.location.href = “tel:9769838218”

//Send Mail
//window.location.href = “mailto:darshanyrane@gmail.com?subject=Hello World&body=Mail from Phonegap”

//Send SMS
//window.location.href = “sms:”+number+”?body=”+message;

 

All the parameter might not work consistently for all default application for e.g. the mail body and subject is passed to G Mail app but not to Yahoo Mail.

If you like the article please share

Leave a reply