Ionic 4 Call Number Not Working

Hello,

I am using Ionic 4 Beta. I am trying to use CallNumber plugin to call a number once clicked on the phone image. However, the call number plugin is not working. I used the correct documentation from the website but so far no luck

call.page.html
<img src = "/assets/icon/cellphone.svg" (click) = "callNow('18001010101')">

call.page.ts

callNow(number){
    this.callNumber.callNumber(number, true)
    .then(res => console.log('Launched dialer!', res))
    .catch(err => console.log('Error launching dialer', err));
  }
1 Like

Forget the callNumber plugin.

Install the inappbrowser plugin and just use a link to the telephone number…

either:

<a href="tel:12345">Call</a>

Or programatically…

window.open(`tel:12345`, '_system');

This will work for PWA’s as well.

2 Likes

same problem with Call number under iOS (real device), simply not working.

On Android real device work fine, but not on iOS.

Any suggestion??

1 Like

can you put a example making call using inappbrowser plugin?

Thanks,

1 Like

Sure…

1 Like

Hi derman,
Have u found solution for this. I’m also facing same issue when dialing numbers , opening outlook mails. It works fine n android with in app browser plugin. But iOS not working

I think the Functionality to directly start a Call is not available in iOS. What happens when you run the Code in iOS? Does the Confirm Call popup appear?

Forget the callNumber plugin.

Install the inappbrowser plugin and just use a link to the telephone number…

either:

<a href="tel:12345">Call</a>

Or programatically…

window.open(`tel:12345`, '_system');

This will work for PWA’s as well.

Yeah, but maybe sometimes you want to directly start the call without need the user to start it. That’s what the Plugin does (on Android).

And: You don’t need the InAppBrowser Plugin for what you mentioned.

I had similar problems using the “Call Number” plugin on my MI phone.

Use the in app browser plugin, as suggested by Judgewest2000.

This works for me:-

call() {
    let tel_number = '9870684933'
    window.open(`tel:${tel_number}`, '_system')
  }