Search code examples
androidskype

skype 4 android, call intent


I am using an Intent to call a skype contact from my android application, here is the code:

Intent skypeIntent = new Intent(Intent.ACTION_VIEW);
skypeIntent.setData(Uri.parse("skype:" + contactUserName));
skypeIntent.setComponent(new ComponentName("com.skype.raider", "com.skype.raider.Main"));
skypeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
context.startActivity(skypeIntent);

The thing is this code is not working since the last update of skype (to the version 4.0.0.19550, on a nexus S). Now it only drives me to the "recent actions" tab. Does anyone have the same problem? Does this problem come from my code ?


Solution

  • Well, After a few researches and a look at the syntax of the skype uri ( http://dev.skype.com/skype-uri ), I realized a part of the link was missing in my code.

    So the data to send is now:

    skypeIntent.setData(Uri.parse("skype:" + contactUserName + "?call"));