Need help upgrading to Ionic Framework 4.0? Get assistance with our Enterprise Migration Services EXPLORE NOW

Call Number

Improve this doc

Call a number directly from your Cordova/Ionic application. NOTE: The iOS Simulator (and maybe Android Simulators) do not provide access to the phone subsystem.

Repo: https://github.com/Rohfosho/CordovaCallNumberPlugin

Installation

  1. Install the Cordova and Ionic Native plugins:
    $ ionic cordova plugin add call-number
    $ npm install --save @ionic-native/call-number@4
    
  2. Add this plugin to your app's module

Supported platforms

Usage

import { CallNumber } from '@ionic-native/call-number';

constructor(private callNumber: CallNumber) { }

...


this.callNumber.callNumber("18001010101", true)
  .then(res => console.log('Launched dialer!', res))
  .catch(err => console.log('Error launching dialer', err));

Instance Members

callNumber(numberToCall, bypassAppChooser)

Calls a phone number

Param Type Details
numberToCall string

The phone number to call as a string

bypassAppChooser boolean

Set to true to bypass the app chooser and go directly to dialer

Returns: Promise<any>

isCallSupported()

Check if call feature is available

Returns: Promise<any>

API

Native

General