Add Skype contact from another android app

Is there any way to add a new contact into Skype application from another app ? For example this is how you call somebody from another app (taken from here: 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);

You can run skype uris with that method.

/**
 * 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

Unfortunately there are no create contact uri in skype client. But I found create chat like that skype:skype.test.user.1?chat . You can see other uris from there https://msdn.microsoft.com/en-us/skype/skypeuris/skypeuriapireference

链接地址: http://www.djcxy.com/p/49718.html

上一篇: 你如何删除一个ActiveRecord对象?

下一篇: 从另一个Android应用程序添加Skype联系人