I would just try using a File Uri like this:

*final Intent emailIntent = new Intent(android.content.Intent.ACTION_SEND);*
*emailIntent.putExtra(Intent.EXTRA_STREAM, Uri.fromFile(png));*
*emailIntent.setType("image/png");*
*startActivity(Intent.createChooser(emailIntent, 
getString(R.string.send_intent_name)));*

[code taken from 
http://stackoverflow.com/questions/2206397/android-intent-action-send-with-extra-stream-doesnt-attach-any-image-when-choo]


On Monday, January 21, 2013 5:12:19 AM UTC-6, Sascha wrote:
>
> Hello everybody,
>
> I am attaching a small audio stream to emails using a database Uri like 
> "content:/mydb/table/id" as EXTRA_STREAM.
>
> This is working fine for all email clients up to android 4.1 and also in 
> gmail for android 4.2.1. 
> However, when I try to use the same code with stock android email client 
> in android 4.2.1 on Galaxy Nexus, I get the warning "Invalid uri type 
> content://...". 
> The composer is opened, but the attachment is missing.
>
> Can anybody tell me whether that is intentional or a bug that will be 
> fixed with an upcoming update?
>
> Thanks
> Sascha
>
>
>
>

-- 
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

Reply via email to