Reputation: 1551
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 ?
Upvotes: 1
Views: 2308
Reputation: 190
If you want to invoke chat instead of call:
skypeIntent.setData(Uri.parse("skype:" + contactName + "?chat"));
Upvotes: 1
Reputation: 737
I know you may have already found the answer, but if not (and for other developers), you can do it like this:
Intent skypeIntent = new Intent(Intent.ACTION_VIEW);
skypeIntent.setData(Uri.parse("skype:" + contactUserName+ "?call&video=true"));
//make call only then use bellow given code
//skypeIntent.setData(Uri.parse("skype:" + contactUserName+ "?call"));
skypeIntent.setComponent(new nentName("com.skype.raider", "com.skype.raider.Main"));
skypeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MainActivity.this.startActivity(skypeIntent);
Then add in AndroidManifest.xml
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:scheme="skype" />
</intent-filter>
Upvotes: 0
Reputation: 1551
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"));
Upvotes: 3