Android - Google Talk Intents

I am developing an Android application that displays Google Talk contacts with their status - this works fine.

I'm not sure what intention you need to invoke in order to open the chat window using the default Talk app.

  • How do I know what Google Talk intentions are available for calls?
  • How do I know what intentions are available for a call in general?

I can not get the following code to work:

Uri imUri = new
Uri.Builder().scheme("imto").authority("skype)").appendPath("apactple").build();             
Intent intent = new Intent(Intent.ACTION_SENDTO, imUri); 
this.startActivity(intent);

Any ideas?

+3
source share
1 answer

First question:

Uri imUri = new Uri.Builder().scheme("imto").authority("gtalk").appendPath("username(e.g.user@googlemail.com)").build();
Intent intent = new Intent(Intent.ACTION_SENDTO, imUri);

Second question:

final PackageManager packageManager = context.getPackageManager();
final Intent intent = new Intent(Intent.ACTION_SENDTO);
List<ResolveInfo> resolveInfo =
        packageManager.queryIntentActivities(intent,
                PackageManager.MATCH_DEFAULT_ONLY);
+7
source

All Articles