1.0.2 • Published 6 years ago
cordova-plugin-invokedialer v1.0.2
Invoke Dialer
This plugin allows you to invoke the Dialer in the android mobile. This plugin useful in android application created using hosted web application and cordova framework.
Getting Started
Installing
Install the plugin
cordova plugin add cordova-plugin-invokedialerOR
cordova plugin add https://github.com/9adsul/InvokeDialer.gitHow to Use ?
cordova.plugins.InvokeDial.invokeDial(number, successCallback,errorCallback)
The cordova.plugins.InvokeDial.invokeDial function opens the device's default dial application.
numberIts phone number with prefixtel:e.g.tel:040-6700 6700ortel: +91 9989000000successCallbackafter successful invoke it will returnSuccesserrorCallbackit will return error messages if any occures
Supported Platforms
- Android
Example
cordova.plugins.InvokeDial.invokeDial(number, onSuccess, onError);
// number = "tel:040-6700 6700" or "tel: +91 9989000000"
function onSuccess() {
console.log("Phone/Dial invoked successfully.")
}
function onError(message) {
console.error(message);
}