1

On clicking on a textview with skypeID, the application should launch skype for business(lync) and start a call with the specified skypeID, i'm able to launch the app but not start the call option automatically? i was able to do it in skype but not in skype for business(lync), could you kindly suggest me how to do it? TIA

pAr
  • 171
  • 1
  • 16

1 Answers1

0
public static void skype(String number, Context ctx) {
    try {
        //Intent sky = new Intent("android.intent.action.CALL_PRIVILEGED");
        //the above line tries to create an intent for which the skype app doesn't supply public api

            Intent sky = new Intent("android.intent.action.VIEW");
        sky.setData(Uri.parse("skype:" + number));
        Log.d("UTILS", "tel:" + number);
        ctx.startActivity(sky);
    } catch (ActivityNotFoundException e) {
        Log.e("SKYPE CALL", "Skype failed", e);
    }

}

I didn't try this, please try and check. for more info go to this SO link

Community
  • 1
  • 1
droidev
  • 7,352
  • 11
  • 62
  • 94