Hello all,

I am trying to create an MMS message with an audio attachment and a
message for the user to view and then click "send" themselves.  If you
create a new Message on your own, you are able to attach an audio file
(.amr in this case), but how do you do this programatically?

When I do this code below, I get the MMS Compose Message window, but
it gives an error message: "Unsupported picture format.  Please select
a different picture.":

        final Intent i = new Intent(Intent.ACTION_SEND);
        i.putExtra("sms_body", msgText);
        i.putExtra(Intent.EXTRA_STREAM, audioUri);
        i.setType("*/*");
        startActivity(i);


When I run this code below (changed MIME type from "*/*" to "audio/*"
or "audio/amr", Android instead brings up the GMail client with the
audio attachment on the email:

        final Intent i = new Intent(Intent.ACTION_SEND);
        i.putExtra("sms_body", msgText);
        i.putExtra(Intent.EXTRA_STREAM, audioUri);
        i.setType("audio/*");
        startActivity(i);


How can I direct the system to create an MMS message with a .amr
attachment?

Thanks,
Blake

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to