I would like to share something from my application.
Once it is shared (e.g - message sent), I want my application to be active again and the sending app to disappear.
Using the code below, I expected onActivityResult
to be called, but it is never called.
After sending email, my application appears again, but after sending SMS ('Messaging') the messaging app remains. (onActivityResult
is never called)
Thanks :-)
Intent sharingIntent = new Intent(android.content.Intent.ACTION_SEND);
sharingIntent.setType("text/plain");
String shareBody = "This is a test";
sharingIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, "You have to see this!");
sharingIntent.putExtra(android.content.Intent.EXTRA_TEXT, shareBody);
startActivityForResult(Intent.createChooser(sharingIntent, "Share via"),1);
getFragmentManager().popBackStack();