npm.io
1.0.0 • Published 8 years ago

cordova-plugin-native-dialer

Licence
Apache 2.0
Version
1.0.0
Deps
0
Size
10 kB
Vulns
0
Weekly
0

cordova-plugin-native-dialer

=======================

Call a number directly from your cordova application.

Install the plugin using:

npm install cordova-plugin-native-dialer

or

yarn add cordova-plugin-native-dialer

Use the plugin in your JS file:

window.plugins.CallNumber.callNumber(onSuccess, onError, number, bypassAppChooser);

number: String; phone number to call (e.g. "1234567890")

bypassAppChooser: boolean; true if you always wish to bypass the app chooser if user has multiple applications installed that can handle calls

Make sure to create onSuccess and onError call back functions.

Example:

function onSuccess(result){
  console.log("Success:"+result);
}

function onError(result) {
  console.log("Error:"+result);
}

Keywords