Ok, digging into the com.android.mms.ui.ComposeMessageActivity
"handleSendIntent()" method, it appears as though only Image
attachments are expected in Intent Extras? Does anyone have any
creative work-arounds of how to create/send an MMS message with an
audio attachment?
private void handleSendIntent(Intent intent) {
Bundle extras = intent.getExtras();
if (Intent.ACTION_SEND.equals(intent.getAction()) && (extras !
= null) && extras.containsKey(Intent.EXTRA_STREAM)) {
Uri uri = (Uri)extras.getParcelable(Intent.EXTRA_STREAM);
if (uri != null) {
convertMessage(true);
addImage(uri); <---- IMAGE IS
BEING ASSUMED
}
}
}
Will audio attachments via Intents be supported in the "cupcake"
release? (I haven't downloaded it yet myself)
Thanks,
Blake
On Dec 30 2008, 8:52 pm, "Blake B." <[email protected]> wrote:
> 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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---