I'm looking for a way to send MMS message behind the scenes in android without opening a chooser intent. There is no api available for it at the moment. is there anyone that could help me that would be great. I've already tried this but it doesn't work for me.
3 Answers
The code provided from the link you posted worked for me and several other folks here who have posted questions. Depending on the MMSC you are trying to send to, you may be required to insert a particular header (such as in the case with Metro PCS's MMSC) but I assure you the code works with very little modification.
1 Comment
MMS is a HTTP based request in Android. You have to have mobile data to send an MMS. There are no APIs exposed by Android to send an MMS, as they have APIs for SMS. If you want your application to send MMS you will have to write everything. Please refer the AOSP code. https://github.com/android/platform_packages_apps_mms OR you can simply build the Intent and then launch the native Messaging App.
Comments
By giving the mobile No and Subject.And attach the image.
Uri uri = Uri.parse("file://"+Environment.getExternalStorageDirectory()+"/test.png");
Intent i = new Intent(Intent.ACTION_SEND);
i.putExtra("address","1234567890");
i.putExtra("sms_body","This is the text mms");
i.putExtra(Intent.EXTRA_STREAM,"file:/"+uri);
i.setType("image/png");
startActivity(i);