0

I want to add Skype call to my ionic app using AngularJS. I do not know how to go about it. I want it to work such as when I tap a user Skype ID on my app. It should trigger Skype call.

2 Answers2

0

You can achieve this using navigator.startApp like this

First select process name based on platform, then check and finally startup it.

function launchSkype() {
var scheme;

if (device.platform === 'iOS') {
    scheme = 'skype://';
} else if (device.platform === 'Android') {
    scheme = 'com.skype.raider';
} else if (device.platform === 'wp') {
    scheme = 'skype:';
} else if (device.platform === 'windows8') {
    scheme = 'skype:';
}

navigator.startApp.check(scheme, function(message) { /* success */
    navigator.startApp.start(scheme, function(message) {
    }, function(error) { /* error */
        alert("Skype could not be started!");
    });
}, function(error) {
    alert("Skype is not installed!");
});

}

You should check if schemes for iOS, wp and w8 are valid, I just know that it's right for android.

Based on: executing external apps on Android/iOS with Ionic

Regards.

Community
  • 1
  • 1
Guille Acosta
  • 2,051
  • 23
  • 35
0

You need to install these:

cordova plugin add com.lampa.startapp

cordova plugin add cordova-plugin-inappbrowser

cordova plugin add org.apache.cordova.device

Then

$scope.skypeID = skypeID;
      startApp.set({ /* params */
            "action": "ACTION_VIEW",
            "uri":  "skype:"+skypeID  
      }).start();
e7lT2P
  • 1,635
  • 5
  • 31
  • 57