How to attach a xml file to a SMS/MMS message using the Android API <p>I have a custom file type (MIME_TYPE), basically xml, that I'd like to enable users to send to each other. Implementing the email send feature with the xml file as an attachment was straight forward but I'm kinda stuck on the SMS/MMS send feature. Anyone have any guidance?</p> <pre><code> final Intent intent = new Intent(Intent.ACTION_SEND, Uri.parse("mms://")); intent.setType("text/plain"); intent.putExtra("address", "2125551212"); String url = "content://myFile.txt"; intent.putExtra(Intent.EXTRA_STREAM, Uri.parse(url)); intent.putExtra("sms_body", "some text goes here"); startActivityForResult(Intent.createChooser(intent, "mms-sms:"), SENT_TEXT); </code></pre> <p>the intent.putExtra(Intent.EXTRA_STREAM... doesn't seem to work, I get an error message: "UNABLE TO ATTACH. FILE NOT SUPPORTED"</p>