0

I'm trying to develop an applicaton in which a part makes a call to skype without further user input. Following snippet does not place the call itself, but only takes me to the skype contact-page. I still have to push the call button. What can I do to make the call automatically? I already request the CALL_PHONE permissions.

        Intent intent = new Intent();
        intent.setAction(Intent.ACTION_VIEW);
        intent.setData(Uri.parse("skype:" + contactId + "?call"));
        startActivity(intent);

Thanks in advance!

  • Try this maybe it will help you https://stackoverflow.com/questions/10132556/how-to-start-a-skype-call-from-an-android-app. Thank you – Ajay Thakur Apr 16 '20 at 07:11

1 Answers1

0

Please check in skype developer doc. They provides Mobile SDK and APIs for skype call. Please refer Microsoft doc for Starting a call from an Android mobile device For Business.

Button skypeButton = (Button) findViewById(R.id.button);
   final EditText SIPAddress = (EditText) findViewById(R.id.SIPAddress) ;
   final CheckBox videoCall = (CheckBox) findViewById(R.id.videoCheck);
   skypeButton.setOnClickListener(new View.OnClickListener() {
       @Override
       public void onClick(View view) {

           String uriString = "ms-sfb://call?id="+SIPAddress.getText().toString();
           if (videoCall.isChecked()){
               uriString +="&video=true";
           }
           Uri uri = Uri.parse(uriString);
           Intent callIntent = new Intent(Intent.ACTION_VIEW, uri);
           startActivity(callIntent);
       }
   } );

And for Skype SDK for Android as per doc you can call using that.

try { 
SkypeApi skypeApi = new SkypeApi(getApplicationContext()); 

    skypeApi.startConversation(skypeName.toString(), 
     Modality.AudioCall); 
  } catch (SkypeSdkException e) { 
    // Exception handling logic here 
} 

You can also use URI to call for these refer this link Skype URI tutorial: Android apps and answer How to start a Skype call from an Android app?

Upendra Shah
  • 2,218
  • 17
  • 27
  • Hello, that's for Skype for business. My question handles the normal skype (which is not the same) – Wouter Vanhauwaert Apr 16 '20 at 07:34
  • Okay. I updated answer. Can you check and let me know. I added a link also so It may helpful to you. – Upendra Shah Apr 16 '20 at 07:40
  • https://stackoverflow.com/a/61245298/6041365 here also mention answer for skype calling using URI – Upendra Shah Apr 16 '20 at 07:58
  • I followed https://learn.microsoft.com/en-us/skype-sdk/skypeuris/skypeuritutorial_androidapps but my example code above is mapping that too. It brings me to a screen, where i still need to say I want to connect. So my question is, is there anybody who uses is and where it's working? – Wouter Vanhauwaert Apr 16 '20 at 21:45
  • I just found out it has something todo with the skype version itself. With Skype V8.15.0.430 it works as intended. Only in later versions, somewhere it dropped this auto-call functionality or something. Who should we ask? Are there change-notes available somewhere? – Wouter Vanhauwaert Apr 16 '20 at 22:34