cordova-plugin-phonecallstate

0.1.4 • Public • Published

NPM

cordova-plugin-phonecallstate

Phone Call State Plugin for Cordova Android, compatible for ionic 2.

Installation

cordova plugin add cordova-plugin-phonecallstate

Usage

declare var PhoneCallState: any;

PhoneCallState.watchState((response) => {
  let state: string = response.state;
  let incoming_number: string = response.number;

  switch (state) {
    case 'IDLE':
      break;
    case 'OFFHOOK':
      break;
    case 'RINGING':
      break;
  }
}, (err) => {
  // Permission Denied
});

Readme

Keywords

none

Package Sidebar

Install

npm i cordova-plugin-phonecallstate

Weekly Downloads

2

Version

0.1.4

License

MIT

Last publish

Collaborators

  • seed880505