I just started implementing a share functionality but was wondering if its possible to tell how my content was shared (facebook/twitter/text/etc) without writing my own implementation of chooser. My initial guess was to use startActivityForResult when launching the chooser but haven't managed to figure out which requestcode to use.
public void share(String subject,String text) {
final Intent intent = new Intent(Intent.ACTION_SEND);
intent.setType("text/plain");
intent.putExtra(Intent.EXTRA_SUBJECT, subject);
intent.putExtra(Intent.EXTRA_TEXT, text);
startActivity(Intent.createChooser(intent, getString(R.string.share)));
}
Any help would be greatly appreciated! :)