Your ContentProvider must be fully implemented for the correct handling of 
files. First of all your ContentProvider's query method must recognize and 
process MediaStore queries. Such a query returns detailed information about 
display name, file size and mime types of the queried Uri. In my experience 
you can happily ignore the selection parameter. Apps are only interested in 
that one single file you offer represented by the Uri.

Then there's the getType method you should implement in order to return the 
correct mime type for a content Uri.


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