Training
Module
Get started with the Dynamics 365 Sales mobile app - Training
Learn about the Dynamics 365 Sales mobile app.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Learn how to incorporate Skype communication functionality into your Android apps.
Applies to: Skype
You can use Skype URIs in your Android apps, for example, tapping a contact's picture might start a Skype audio call. After you have constructed the appropriate Skype URI, use an Android Intent to initiate its actions.
Keep in mind these two important points regarding the Skype for Android client:
/**
* Initiate the actions encoded in the specified URI.
*/
public void initiateSkypeUri(Context myContext, String mySkypeUri) {
// Make sure the Skype for Android client is installed.
if (!isSkypeClientInstalled(myContext)) {
goToMarket(myContext);
return;
}
// Create the Intent from our Skype URI.
Uri skypeUri = Uri.parse(mySkypeUri);
Intent myIntent = new Intent(Intent.ACTION_VIEW, skypeUri);
// Restrict the Intent to being handled by the Skype for Android client only.
myIntent.setComponent(new ComponentName("com.skype.raider", "com.skype.raider.Main"));
myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
// Initiate the Intent. It should never fail because you've already established the
// presence of its handler (although there is an extremely minute window where that
// handler can go away).
myContext.startActivity(myIntent);
return;
}
Your Android app can use the PackageManager.getPackageInfo method to determine whether a Skype client is installed on the device.
/**
* Determine whether the Skype for Android client is installed on this device.
*/
public boolean isSkypeClientInstalled(Context myContext) {
PackageManager myPackageMgr = myContext.getPackageManager();
try {
myPackageMgr.getPackageInfo("com.skype.raider", PackageManager.GET_ACTIVITIES);
}
catch (PackageManager.NameNotFoundException e) {
return (false);
}
return (true);
}
If the Skype client is not installed, your app should alert the user, and direct them to the Android Market or Google PlayStore. Ideally, your app should use a market: scheme Intent to navigate directly to the Skype for Android install page.
/**
* Install the Skype client through the market: URI scheme.
*/
public void goToMarket(Context myContext) {
Uri marketUri = Uri.parse("market://details?id=com.skype.raider");
Intent myIntent = new Intent(Intent.ACTION_VIEW, marketUri);
myIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
myContext.startActivity(myIntent);
return;
}
Training
Module
Get started with the Dynamics 365 Sales mobile app - Training
Learn about the Dynamics 365 Sales mobile app.
Documentation
Find answers to frequently asked questions about using Skype URIs in your applications and webpages.
Learn how to incorporate Skype communication functionality into your web pages.
Skype URIs branding guidelines
Learn how to properly and effectively incorporate Skype branding elements into your applications.