cordova-plugin-os-call-number
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

CordovaCallNumberPlugin

Call a number directly from your cordova application.

Install the plugin using:

cordova plugin add cordova-plugin-os-call-number --save

or if you use Ionic

ionic cordova plugin add cordova-plugin-os-call-number

Use the plugin in your JS file:

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

Or by importing it as a Module

import { CallNumber } from 'cordova-plugin-os-call-number';
 
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);
}

Package Sidebar

Install

npm i cordova-plugin-os-call-number

Weekly Downloads

0

Version

1.0.3

License

Apache 2.0

Unpacked Size

11.8 kB

Total Files

10

Last publish

Collaborators

  • neilbarnes
  • markmillardjones
  • oneserve-user