Interesting, I didn't know that. Looks like that is only partially implemented: you can get an InputStream from such a resource-Uri, but there isn't actually a content provider that handles that scheme and can give you a file descriptor for it, which means it can't work for media playback.
On Mon, Feb 16, 2009 at 4:48 AM, Mark Murphy <mmur...@commonsware.com>wrote: > > Marco Nelissen wrote: > > On Sat, Feb 7, 2009 at 12:03 PM, pperotti <pablo.pero...@gmail.com > > <mailto:pablo.pero...@gmail.com>> wrote: > > (...) > > > > Uri uri = Uri.parse("android.resource://com.pp/" + > > R.raw.test_cbr); > > > > > > This is the second time in as many days I see somebody trying to access > > a resource that way. Is there some misguided tutorial somewhere that > > claims that this works, or is the documentation misleading in some way? > > I can tell you: > > -- The documentation for ContentResolver has SCHEME_ANDROID_RESOURCE > defined as "android.resource" > > -- Joe Onorato, back in March 2008, described the above pattern for > accessing resources: > > > http://groups.google.com/group/android-developers/browse_thread/thread/74cc21c9e613f608/7ecb48800e7faab1 > > (also at http://tinyurl.com/ansdr7 in case that URL gets munged by your > mail client) > > That being said, I haven't used this scheme in ages, so if it is > officially deprecated, that would be good to know. Particularly since I > can think of one Android book that will need a-fixin' if this scheme is > no longer usable... ;-) > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com > > Android Training on the Ranch! -- Mar 16-20, 2009 > http://www.bignerdranch.com/schedule.shtml > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---