0

I had used below code to do MMS

Intent sendIntent = new Intent(Intent.ACTION_SEND); 
sendIntent.putExtra("sms_body", "some text"); 
sendIntent.putExtra(Intent.EXTRA_STREAM, Uri.parse(url));
sendIntent.setType("image/png")

I want to sent :- Text,URL ,Audio file in MMS I want to know that is there any DLL file is to be used for samsung device for MMS. As the samsung deivce the app get crashed for MMS

Thanks in advance

ios developer
  • 3,363
  • 3
  • 51
  • 111

1 Answers1

-1

If you have to send MMS with any Image then use this code.

Intent sendIntent = new Intent(Intent.ACTION_SEND); 
            sendIntent.setClassName("com.android.mms", 

               "com.android.mms.ui.ComposeMessageActivity");
            sendIntent.putExtra("sms_body", "some text"); 
            sendIntent.putExtra(Intent.EXTRA_STREAM, 
                      Uri.parse("file:///sdcard/image_4.png"));
            sendIntent.setType("image/png");
             startActivity(sendIntent);;

OR

If you have to send MMS with Audio or Video file then use this.

Intent sendIntent = new Intent(Intent.ACTION_SEND); 
                sendIntent.setClassName("com.android.mms", 

                 "com.android.mms.ui.ComposeMessageActivity");
                sendIntent.putExtra("address", "1213123123");
                sendIntent.putExtra("sms_body", "if you are sending text");   
                final File file1 = new File(mFileName);
                if(file1.exists()){
                    System.out.println("file is exist");
                }
                Uri uri = Uri.fromFile(file1);
                sendIntent.putExtra(Intent.EXTRA_STREAM, uri);
                sendIntent.setType("video/*");
                startActivity(sendIntent);

let me know if this help you.

swiftBoy
  • 35,607
  • 26
  • 136
  • 135