0

I want to attach to mms multiple images and attach also body to one of slides. This is my saving bitmap to internal storage code:

Bitmap b2 = DrawingUtil.buildMyBitmap();
                fos = openFileOutput("1.jpg", Context.MODE_WORLD_READABLE);
                b2.compress(Bitmap.CompressFormat.JPEG, 20, fos);
                fos.flush();
                fos.close();

And an Intent which works almost well.

final Intent mmsIntent = new Intent(android.content.Intent.ACTION_SEND_MULTIPLE);

mmsIntent.setType("vnd.android-dir/mms-sms");

mmsIntent.putExtra("address", "0123456");
mmsIntent.putExtra("subject", "the subject");
mmsIntent.putExtra("sms_body", "the body");

uris.add(Uri.fromFile(getFileStreamPath("1.jpg")));
uris.add(Uri.fromFile(getFileStreamPath("2.jpg")));
uris.add(Uri.fromFile(getFileStreamPath("3.jpg")));
uris.add(Uri.fromFile(getFileStreamPath("4.jpg")));

mmsIntent.putParcelableArrayListExtra(Intent.EXTRA_STREAM, uris);
MainActivity.this.startActivityForResult(Intent.createChooser(mmsIntent, getString(R.string.chooseIntentMMS)), SEND_EMIAL_INTENT);

MMS with slideshow is sending, but I have two problems still not solved. Firstly, the body is always attaching to first slide, but I want to attach it to thirt image. Secondly, images attach with not proper order, so the slideshow first show 3.png, then 2, 4, 1. When I change images to another bitmap, then order is different, but still 'random'.

Can you help me out? Thank in advance.

1 Answers1

0

Ok, ther order was improper, becouse first bitmap had too large dimensions. It was compressed and then added to the end of slideshow. Scaling down dimensions to 480x480 solved problem.

But still I dont know how to add text to other slides.