Building apps at a large company? Check out Ionic Enterprise

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
    
  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(() => console.log('Launched dialer!'))
  .catch(() => console.log('Error launching dialer'));

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>

API

Native

General