Ionic 4 | How to Call a Number Directly from Ionic 4 Native Application

To make it more convenient, we can add a feature to make calls directly through the application. In this post, we will create an Ionic 4 application, in which we can directly call a number by using Cordova and Ionic Native plugins.

Let’s start…

Also Read: Ionic 4 | Read Call Logs (Incoming, Missed, Outgoing) and Add Call Number in Ionic 4 Native

Create a new Ionic 4 application

First, make sure you have the latest version of Ionic CLI installed

Open Command prompt and run following commands to create a new project

Install Plugins

After creating application we will install Cordova and Ionic Native plugins.

Import Plugins in App Module

Open app.module.ts and replace below code.

Add Method in Home Component

In file, we will import plugin then add methods.

Here callNumber method accepts two parameters, first is number to call, second it boolean to select between available applications.

Add HTML Button to Make Call

In home.html, we will add a button to make calls

Above we created an Ionic 4 Application with CallNow method to make calls directly from an application. Now you can test this application in the real device.

Leave a Reply

Notify of