0

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.

Hauleth
  • 22,873
  • 4
  • 61
  • 112
antapp
  • 1
  • 2
  • 4
  • Ya i am running into problems with that example as well: http://stackoverflow.com/questions/14452808/sending-and-receiving-sms-mms-in-android – Etienne Lawlor Mar 09 '13 at 20:49

3 Answers3

1

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.

  • Hey @anEngineerIn707, the included link https://github.com/android/platform_packages_apps_mms contains what appears to be an entire android project. Did you include that project as a module in your own project to get MMS sending to work, or are there a subset of classes that you are working with to get MMS sending to work. – Etienne Lawlor Feb 16 '14 at 17:38
1

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.

Virag Brahme
  • 2,062
  • 1
  • 20
  • 32
Naren
  • 2,706
  • 1
  • 21
  • 15
0

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);
anshad
  • 824
  • 8
  • 19