Launch dialer app from meteor app

303 views Asked by At

I have been trying hard to figure out a way to launch dialer app to make phone call from an app developed on meteor platform but did not find a way to do so.

In meteor documentation they have mentioned meteor launches dialer app if its wrapped in <a> tag eg: <a href="tel:+1 xxx xxx xxxx> +1 xxx xxx xxxx </a>. This approach works when I am deploying meteor app on server and opening it through mobile web browser. But if I run it on my android device using command meteor run android-device it does not work. When i click the link nothing happens. Please suggest me a way to make it work as android app.

Thanks in advance.

1

There are 1 answers

0
 Michel Glenn On BEST ANSWER

You can have a look on cordova-plugin like call-number : CordovaCallNumberPlugin I have install it in my meteor cordova project. It works fine on Android and iOS.

callSuccess = function(){
  console.log('call done');
  }

callError = function(){
  console.log('Error : verify phone number');
  }

window.plugins.CallNumber.callNumber(callSuccess, callError,'+1123456789',true);