The one that will ask my content provider is a camera app's image viewer. >From what I have found in git it only calls ContentResolver.openInputStream(). I doesn't use cursor.
Am I mistaken? On Jan 8, 4:55 pm, John Seghers <jsegh...@cequint.com> wrote: > The only time you need to implement openAssetFile() is when you have > files that you want the user of ContentProvider to open. For example, > if you were writing a picture ContentProvider, you may pass > description information in response to a query along with a URL that > can be used for ContentResolver.openAssetFileDescriptor (or > ContentResolver.openInputStream which calls it). > > However, if you just need to pass a blob of decrypted data, you can > pass that as a blob in one of the Cursor columns. No need for it to > hit the filesystem at all. > > On Jan 7, 4:37 pm, gnugu <rho...@gmail.com> wrote: > > > Data is encrypted and stored in the file. ContentProvider decrypts > > data and I would like to avoid to write decrypted data to the file > > just to get file descriptor. > > > How did you implement yours? > > > Thanks. > > > On Jan 7, 4:34 pm, Brion Emde <brione2...@gmail.com> wrote: > > > > You don't say where your data is stored. I'm fetching data from a web > > > service in JSON format. I decided to encapsulate the interactions with > > > the service, which is RESTful, as a ContentProvider for Android. It's > > > working well, so far. I still need to integrate authentication. > > > > On Jan 7, 3:08 pm, gnugu <rho...@gmail.com> wrote: > > > > > Hi, > > > > I'm writing a ContentProvider that will provide content that is not > > > > stored in a file or database. > > > > > I understand hat I have to overwrite openAssetFile() method. > > > > > My problem is that I don't know how to create AssetFileDescriptor from > > > > data in memory (byte array or stream). > > > > > Can anybody please point me to the right direction? > > > > > I was digging in Android source where they use MemoryFile but I can't > > > > obtain ParcelFileDescriptor from MemoryFile :(. > > > > > Any help greatly appreciated. > > > > > Thanks.- Hide quoted text - > > > - Show quoted text -
-- 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