I tried the following, but not one of them reaches my goal.
The following code showing the selector.
Intent mmsIntent = new Intent(Intent.ACTION_SEND);
mmsIntent.putExtra("sms_body", "some text");
mmsIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));
mmsIntent.setType("image/png");
startActivity(mmsIntent);
The following code shows a message message, but the image is not connected.
Intent smsIntent = new Intent(Intent.ACTION_SENDTO);
smsIntent.addCategory(Intent.CATEGORY_DEFAULT);
smsIntent.setType("vnd.android-dir/mms-sms");
smsIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));
smsIntent.setData(Uri.parse("sms:" + "89565656"));
startActivity(smsIntent);
But, I need the message to make up a view with my image from the SD card. How to achieve this.
Thanks in advance...!
source
share