title: Android: ActivityNotFoundException occasionally encountered when trying to send MMS on specific devices
body: <p>I am using the wonderful ACRA library to report any errors that users experience with the beta version of my app. What it has shown so far is that some users experience problems sending MMS messages, while most do not. 
   In particular I found that a user using a Droid Bionic device experienced this error, but when I run the Droid Bionic emulator locally, I have don't have a problem.
   The code I use to start the MMS activity is...</p>
  
  <pre><code>File imageFile = new File(getContext().getFilesDir() + File.separator + fileName);
  Uri uri = Uri.fromFile(imageFile);
  Intent sendIntent = new Intent(Intent.ACTION_SEND);
  sendIntent.setClassName("com.android.mms", "com.android.mms.ui.ComposeMessageActivity");
  sendIntent.putExtra("sms_body", ""); 
  sendIntent.putExtra(Intent.EXTRA_STREAM, uri);
  sendIntent.setType("image/png");
  getContext().startActivity(sendIntent);
  </code></pre>
  
  <p>The error I see - only very occasionally - is :</p>
  
  <p>android.content.ActivityNotFoundException: Unable to find explicit activity class {com.android.mms/com.android.mms.ui.ComposeMessageActivity}; have you declared this activity in your AndroidManifest.xml?</p>
  
  <p>My suspicion is that perhaps certain carriers have modified Android and overridden/disabled the default MMS activity. I don't really have a good way of testing this as all the physical devices and carriers I have personally tested it on have no problem with this code. And as I mentioned, the Droid Bionic emulator works fine, but it was one of the devices in the field that had a problem.</p>
  
  <p>I'm wondering if anyone has experienced something similar and has a suggested workaround? Or if someone has a method for sending MMS on Android that works on all devices/carriers.</p>
  
  <p>(For now I am just catching the exception and letting the user know that I couldn't send MMS with their device.)</p>
  
  <p>p.s. I saw in another forum someone suggesting just removing the classname for the intent. The problem with that is when you do that all and sundry types of applications say they can handle the intent (e.g Evernote) when in fact I really just want MMS or nothing. </p>