I would like to share something from my application. When it is sent (for example, a message has been sent), I want my application to reactivate and the send application to disappear. Using the code below, I expected onActivityResult be called, but it never gets called.
After sending the email, my application appears again, but after sending the SMS ("Messages") the messaging application remains. ( onActivityResult 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();
source share