call-number
Advanced tools
Comparing version 0.0.2 to 1.0.0
{ | ||
"name": "call-number", | ||
"version": "0.0.2", | ||
"version": "1.0.0", | ||
"description": "Call Number from Cordova Application", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -12,7 +12,28 @@ CordovaCallNumberPlugin | ||
or | ||
``` java | ||
npm install call-number | ||
``` | ||
Use the plugin in your JS file: | ||
``` javascript | ||
window.plugins.CallNumber.callNumber(onSuccess, onError, number); | ||
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: | ||
``` java | ||
function onSuccess(result){ | ||
console.log("Success:"+result); | ||
} | ||
function onError(result) { | ||
console.log("Error:"+result); | ||
} | ||
``` |
var CallNumber = function(){}; | ||
CallNumber.prototype.callNumber = function(success, failure, number){ | ||
cordova.exec(success, failure, "CallNumber", "callNumber", [number]); | ||
CallNumber.prototype.callNumber = function(success, failure, number, bypassAppChooser){ | ||
cordova.exec(success, failure, "CallNumber", "callNumber", [number, bypassAppChooser]); | ||
}; | ||
@@ -6,0 +6,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
8317
0
39