Created
September 2, 2014 05:57
-
-
Save rahulinaction/2703b8c6f30f5daa1732 to your computer and use it in GitHub Desktop.
A sample javascript plugin file for calling phone number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var PhoneDialer = function() { | |
} | |
PhoneDialer.prototype.dial = function(phnum) { | |
//alert("the phonedialer"+phnum) | |
cordova.exec("PhoneDialer.dialPhone", {"number" : phnum }); | |
}; | |
if(!window.plugins) { | |
window.plugins = {}; | |
} | |
if(!window.plugins.phoneDialer) { | |
window.plugins.phoneDialer = new PhoneDialer(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment