In my Android app, I'm using following code to share a photo with any app that can share it. So depending on what app is installed it can be shared with gmail, facebook, twitter and so on.
Here are my questions:
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.setType("image/png");
Uri uri = Uri.parse("android.resource://com.mypackage.myapp/"+MainScreen.selectedCardId);
shareIntent.putExtra(Intent.EXTRA_STREAM, uri);
shareIntent.putExtra(Intent.EXTRA_TEXT, "Email body text");
startActivity(Intent.createChooser(shareIntent, "Share your card with:"));
This question may be related to: Successful share intent for android
Basically it depends on the target app, whether they set a result and send back to your app or not. It's quite unreliable at this point from what I understand and I'm looking for a workaround too!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With