有没有办法从其他应用程序向Skype应用程序添加新联系人? 例如,这是你从另一个应用程序(取自这里:How to video call a user through skype from another android application?)呼叫某人的方式:
Intent sky = new Intent("android.intent.action.VIEW");
sky.setData(Uri.parse("skype:" + "UserName"+ "?call&video=true"));
startActivity(sky);
答案 0 :(得分:1)
您可以使用该方法运行skype uris。
/**
* 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;
}
//source: https://msdn.microsoft.com/en-us/skype/skypeuris/skypeuritutorial_androidapps
不幸的是,在skype客户端中没有创建联系人uri。但我发现像skype:skype.test.user.1?chat
那样创建聊天。你可以看到其他的uris https://msdn.microsoft.com/en-us/skype/skypeuris/skypeuriapireference