从另一个 android 应用添加 Skype 联系人

Add Skype contact from another android app

有没有办法从另一个应用程序向 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);

您可以 运行 使用该方法进行 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