On Sun, Dec 30, 2012 at 5:24 PM, William Ferguson
<[email protected]> wrote:
> So considering the use case how do I rebuild without using
> MODE_WORLD_READABLE?

Create a ContentProvider to serve the file using openFile(). Then use
a content:// Uri instead of a file:// Uri. This may reduce the number
of apps that can handle the ACTION_SEND Intent -- those that
advertised that they specifically support file:// instead of just
generically supporting the MIME type will not show up in your chooser.

Here is a sample project that packages a PDF file in an asset, unpacks
it on first run, then makes that PDF available via a ContentProvider
and views it using ACTION_SEND and your chosen PDF viewer:

https://github.com/commonsguy/cw-omnibus/tree/master/ContentProvider/Files

--
Mark Murphy (a Commons Guy)
http://commonsware.com | http://github.com/commonsguy
http://commonsware.com/blog | http://twitter.com/commonsguy

In questi siti web puoi chiedere o rispondere a domande relative allo
sviluppo di applicazioni Android: http://www.andglobe.com

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