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.

1

3 Answers 3

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.

Sign up to request clarification or add additional context in comments.

1 Comment

Hey @anEngineerIn707, the included link 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.
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.

Comments

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);

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.