ContentProvider and ParcelFileDescriptor

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

ContentProvider and ParcelFileDescriptor

Postby TommyN » Sat Apr 25, 2009 6:11 pm


I've made a ContentProvider where I have overridden the "openFile" function and return a ParcelFileDescriptor. The problem I'm having is that I have to copy the res/raw resources to the file system before I can pass them along using, ParcelFileDescriptor.MODE_READ_ONLY);

Is there a way to share the resources embedde in my ContentProvider without resorting to first copying the resource to disk and doing:

URI uri = URI.create("file:///data/data/<package>/files/myfile");
File file = new File(uri);
return, ParcelFileDescriptor.MODE_READ_ONLY);

Posts: 3
Joined: Sat Apr 25, 2009 6:02 pm


Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Google [Bot] and 8 guests