title: How to attach an image in MMS programmatically in android
body: <p>I have tried the following but none of them are reaching my goal.</p>
  
  <p>following code showing a chooser.</p>
  
  <pre><code> Intent mmsIntent = new Intent(Intent.ACTION_SEND); 
              mmsIntent.putExtra("sms_body", "some text"); 
              mmsIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));
              mmsIntent.setType("image/png");
              startActivity(mmsIntent);
  </code></pre>
  
  <p>following code shows compose message view, but image is not attached.</p>
  
  <pre><code>Intent smsIntent = new Intent(Intent.ACTION_SENDTO);
          smsIntent.addCategory(Intent.CATEGORY_DEFAULT);
          smsIntent.setType("vnd.android-dir/mms-sms");
          smsIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(file));//Uri.parse(url));
          smsIntent.setData(Uri.parse("sms:" + "89565656"));
          startActivity(smsIntent);
  </code></pre>
  
  <p>But,
      I need the message compose view with my image from sd card.
  How to achieve this.</p>
  
  <p>Thank you in advance...!</p>