Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhoneGap: Make phone call within application

Is there a way to initiate a phone call within an application using PhoneGap?

I know it's possible to use tel: hyperlinks to invoke the dialer, but this means that the application is paused. I'm trying to get this to work from within the application.

Any ideas?

like image 614
Nick Avatar asked May 19 '13 11:05

Nick


1 Answers

You can use the CallNumber cordova plugin (call-number on npm) to make the actual call.

To keep running in the background (when your app is paused due the dialer taking over), there is cordova-plugin-background-mode. As your app will keep running, you can use the success callback passed to the CallNumber API to do stuff when the phone-call has succeeded.

like image 62
Eliran Malka Avatar answered Sep 28 '22 08:09

Eliran Malka