I want to share image with text via intent. not a image whole or text differtent. see this is my code:
Uri imageUri = Uri.parse("android.resource://" + getPackageName()
+ "/drawable/app_icon");
String shareTxt = "Hey, now this is image "+ imageUri + " text.";
Intent shareIntent = new Intent();
shareIntent.setAction(Intent.ACTION_SEND);
shareIntent.putExtra(Intent.EXTRA_TEXT, shareTxt);
shareIntent.putExtra(Intent.EXTRA_STREAM, imageUri);
shareIntent.setType("image/*");
shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
startActivity(Intent.createChooser(shareIntent, "Share"));
Output: I need to : "Text IMAGE text"
but actually out put this: image whole below text coming.
So, android people help me.
Aucun commentaire:
Enregistrer un commentaire