skype2018 android,Skype SDK for Android

Skype SDK for Android

04/27/2018

2 minutes to read

In this article

The Skype for Android SDK enables your Android mobile device application to start chat, audio, and video conversations with the Skype client.

Applies to: Skype

This SDK works with the Skype client for Android but not the Skype for Business client for Android. If you want to start Skype for Business conversations from an Android device, see Skype for Business - Mobile URIs.

What can I do with the Skype for Android SDK?

Help your users get in contact with you by instant message, video or voice call. Use Skype's infrastructure to power your communication.

This SDK will allow you to deep link to a call or instant message chat in the Skype app using an Intent, removing the complexity of building URLs for Intents.

Using the SDK

Import the Android SDK from jCenter

Configure your Android project to download project dependencies from jcenter. Add this Gradle code to project level build.gradle, before the dependencies:

repositories {

jcenter()

}

Add a dependency on the jcenter hosted Skype Android SDK: Add the following Gradle code to the app build.gradle file dependencies section where you will use the Skype dependency

compile 'com.skype.android.skype-android-sdk:MobileSdk:1.0.0.0'

Call the API

Details of the API and how to call it are described in the API documentation. The embeddable button will initiate a Skype call to a specific Skype user. To create the button, you need to know the Skype user's Skype Name. In most cases this will be one that you already manage. If you don't know your Skype Name, this guide will help you find it.

If you want to initiate a call or chat with a bot built with the Microsoft Bot Framework rather than a human Skype user. To do this, get the Microsoft App ID for your bot from your bot page. Once you have this, prefix the Microsoft App ID with '28:'. Pass the modified App ID to the API as the accountId. The accountId will be of the format: '28: b4914413-f8dd-4cb3-b2db-9b715ecfe26e'

Call a Skype user

Add the following Java code to the callback method for the click event of your Skype button:

try {

SkypeApi skypeApi = new SkypeApi(getApplicationContext());

skypeApi.startConversation(skypeName.toString(), Modality.AudioCall);

} catch (SkypeSdkException e) {

// Exception handling logic here

}

Chat with a Microsoft Bot Framework Bot

Start a chat with a Bot: Add the following code to the callback method for the click event of your Skype button:

try {

SkypeApi skypeApi = new SkypeApi(getApplicationContext());

//Get the app id of your bot and prepend 28:

skypeApi.startConversation('28: b4914413-f8dd-4cb3-b2db-9b715ecfe26e', Modality.Chat);

} catch (SkypeSdkException e) {

// Exception handling logic here

}

Style your Skype button

Your link to the Skype app must follow these branding guidelines.

Update your Skype privacy settings

You should make sure that the Skype Names that you are using are configured to allow incoming calls and messages from anyone. To change your privacy settings, install Skype on a Windows computer or Mac. Read about how to change your settings from Skype for Windows and Skype for Mac. Depending on the modality you selected, you're likely to have to change your privacy settings to allow either IMs or video from anyone.

Note

By default, Skype is setup not to allow instant messages from people that aren't in your Skype contacts list. If you're using the SDK for instant messaging, we strongly advise you to change your privacy settings.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值