[android-developers] Re: How to write ContentProvider for content not stored in a file nor DB?

2010-08-19 Thread Sergey
Thanks a lot everyone! It looks like the is no easy way. I will try what Kostya suggested. If I'll fail, I'll just wait for the future SDK versions to add the missing APIs. Or may be I'll develop my app for iPhone instead. (just kidding ;-) Thanks, --Sergey On Aug 16, 6:54 am, Kostya Vasilyev

[android-developers] Re: How to write ContentProvider for content not stored in a file nor DB?

2010-08-19 Thread Paul Turchenko
I am not saying it's hard, I just pointed out that WidgetExplorer from Unlocking Android doesn't cover what Sergey is asking for On Aug 16, 4:54 pm, Kostya Vasilyev kmans...@gmail.com wrote:   Sereja Pavel, It should be just a little bit more involved than writing a SQL-based one. For

[android-developers] Re: How to write ContentProvider for content not stored in a file nor DB?

2010-08-16 Thread Paul Turchenko
They use Database! Sergey is asking about building content provider around non-db storage. On Aug 16, 4:29 am, Indicator Veritatis mej1...@yahoo.com wrote: Expect to override a lot more methods in ContentProvider and ContentResolver than other people do. You may want to look at the example

Re: [android-developers] Re: How to write ContentProvider for content not stored in a file nor DB?

2010-08-16 Thread Kostya Vasilyev
Sereja Pavel, It should be just a little bit more involved than writing a SQL-based one. For structured data, you'd need to create your own Cursor subclass, and return it from the provider's query method. If query results are small enough to fit in RAM, then it's easiest to use

[android-developers] Re: How to write ContentProvider for content not stored in a file nor DB?

2010-08-15 Thread Indicator Veritatis
Expect to override a lot more methods in ContentProvider and ContentResolver than other people do. You may want to look at the example WidgetExplorer from Unlocking Android. Go to the book's website, download the sample code and look in the code for chapter 5. I suggest this example because here

[android-developers] Re: How to write ContentProvider for content not stored in a file nor DB?

2010-01-08 Thread John Seghers
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

[android-developers] Re: How to write ContentProvider for content not stored in a file nor DB?

2010-01-08 Thread gnugu
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

[android-developers] Re: How to write ContentProvider for content not stored in a file nor DB?

2010-01-07 Thread Brion Emde
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,

[android-developers] Re: How to write ContentProvider for content not stored in a file nor DB?

2010-01-07 Thread gnugu
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