Call number

The call-number plugin is used to call directly from your application. We have used it inside about page for calling the support number:

    $ ionic cordova:plugin add call-number $ npm install @ionic-native/call-number --save

Before using the plugin we have to install the Cordova plugin and NPM install specific package:

// src/pages/about/about.tsimport { CallNumber } from '@ionic-native/call-number';constructor(private call: CallNumber) { }callNow() { this.CallNumbercall.callNumber("+919989887765", true) .then(() => console.log('Launched dialer!')) .catch(() => console.log('Error launching dialer')); }

Get Hybrid Mobile Development with Ionic now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.