0

I'm using an intent chooser to invite friends :

Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, Resources.getString("InvitationSubject", getBaseContext()));

String body = Resources.getString("InvitationBody", getBaseContext()) + Local.User.FirstName;

intent.putExtra(Intent.EXTRA_TEXT, body);

startActivity(Intent.createChooser(intent, "Invite friends"));

Is there a way to know which app the user selected in the chooser ?

Mat
  • 202,337
  • 40
  • 393
  • 406
Alexis
  • 16,629
  • 17
  • 62
  • 107

1 Answers1

1

As far as I know, there is no direct way to gather such information. What would you need it for? Imho the android intent system was designed so you, as an app developer, don't have to worry about what app the user chose to handle your intent.

Rlyr
  • 48
  • 5
  • yeah I know that but I wanted to know if the user invite his friends by messaging or email or anything else, for statistics. – Alexis May 16 '12 at 07:47
  • 3
    Would be interesting tough. Facebook for example doesn't handle the SHARE intent properly, where all other apps do. Hence, it would be nice to check if the user selected FaceBook from the Intent Chooser... – Entreco Aug 23 '12 at 09:19