On Fri, Feb 17, 2012 at 9:51 PM, Mark Murphy <[email protected]> wrote: > On Fri, Feb 17, 2012 at 3:45 PM, John Goche <[email protected]> > wrote: >> I've found the following code which would allow the user to select an >> email client from a list fired as an intent. The email client on the phone >> would have the pdf as an attachment. Here the pdf is called shortcuts.pdf. >> However I don't know how to save it so that it becomes accessible as >> R.raw.shortcuts . How is this magic achieved? What is R.raw? > > R.raw refers to raw resources, stored in res/raw/ in your project (or > other resource sets, such as res/raw-es/ for Spanish-language raw > resources). > >> Does it reside on external storage? > > No. > >> Do I really need to use "content://" and a content provider or can I do >> away with using "android:resource://" as below? > > Only if your PDF is a raw resource.
OK. Well I guess since the PDF is being generated dynamically it does not qualify as a raw resource. I probably don't mind storing the generated PDF on internal storage and making it world readable as there is not much other apps can do with it. This seems like the simplest solution as not all devices possess external storage. I don't see how writing a content provider would release me from any burden. After all, even if I make the content only available to email clients I don't gain much (wouldn't that be the extra purpose of having the content provider?). Plus, how does android know whether an application is an email client with access to the content provider's content or not? Thanks, JG -- 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

