Skype chat screen from intent

Hey guys, I'm trying to make an intention that starts a skype conversation with a specific person. Having looked at all the contents of stackoverflow, I still cannot get it to work correctly. Here is my code:

String skypeUri = "skype:name?chat"; Intent intent = new Intent(); intent.setData(Uri.parse(skypeUri)); intent.setComponent(new ComponentName("com.skype.raider", "com.skype.raider.Main")); intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK); startActivity(intent); 

My intent filter:

  <intent-filter> <action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.VIEW" /> <category android:name="android.intent.category.LAUNCHER" /> <data android:scheme="skype" /> </intent-filter> 

This brings me to skype, but only to the main page, without a conversation. Any help would be appreciated.

+6
source share
2 answers

just use below code

 Intent skypeIntent = new Intent("android.intent.action.VIEW"); skypeIntent.setComponent(new ComponentName("com.skype.raider", "com.skype.raider.Main")); skypeIntent.setData(Uri.parse("skype:" + skypeId + "?chat")); 
+3
source

Assuming this is your exact code, the problem is that you are not passing the name of the user you want to call. You just have a name where the username should be. You need something like:

 String skypeUri = "skype:"+username+"?chat"; 
+1
source

All Articles