Don't want option to be given for sending mms`

I have a requirement in my application in which I have to send MMS on click of button. When I click on the button it prompts to choose using which application I want to complete the action either email or messaging. I want it to open by default with messaging. I searched a lot but couldn't get any answer. Below, I am posting my code:

public class MMSActivity extends Activity {
/** Called when the activity is first created. */
public void onCreate(Bundle savedInstanceState) {
    Button mms = (Button)findViewById(;
    mms.setOnClickListener(new View.OnClickListener() {

        public void onClick(View v) {
            // TODO Auto-generated method stub

public void sendMMS() {
    Intent in = new Intent(Intent.ACTION_SEND);
    in.putExtra("sms_body", "some text");
    in.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(new File(Environment.getExternalStorageDirectory()
    Log.d("MMS", "SendMMS called");

I even tried with setting class as android.telephony.SmsMessage but it didn't worked.


I want it to open by default with messaging

First, it is unclear what you think "messaging" is. I will assume that you mean the Android open source project (AOSP) MMS client.

Second, many devices do not have this app. Device manufacturers are welcome to use whatever MMS client they wish, which may or may not be the AOSP client.

Third, users are welcome to install and use their own SMS/MMS clients that they obtain from the Play Store or elsewhere. By saying that users should not have a choice in the matter, you are saying that you are more important than your users. Your users will tend to disagree.

Please allow your users to use whatever MMS client they wish, and at least one that actually exists.

If you are sending image.

Intent sendIntent = new Intent(Intent.ACTION_SEND); 
        sendIntent.setClassName("", "");
        sendIntent.putExtra("sms_body", "some text"); 
        sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse("file:///sdcard/image_4.png"));

Need Your Help

regex for email validation: where is the error?

php regex email email-validation

This sounds strange, but I've been using this function for quite a while now and "suddenly, from one day to the other" it does not filter some addresses in the right way anymore. However, I cannot...

ImportError: cannot import name widgets from django.contrib.admin

python django django-admin newrelic

I'm getting the following inexplicable error all of a sudden: