How to organize database access code in Android project?

Posted by Mladen Jablanovic on Stack Overflow See other posts from Stack Overflow or by Mladen Jablanovic
Published on 2010-05-17T14:54:53Z Indexed on 2010/05/17 17:30 UTC
Read the original article Hit count: 148

Filed under:
|
|

I have created a ContentProvider for my main Sqlite table, pretty much following NotePad example from SDK (although I am not sure whether I will ever be exposing my data to other apps). However, I need to create lots of other, non-trivial queries on that and other tables and views. A good example would be queries to extract some statistics from the base data, averages, totals etc.

So what's the best place for this code in an Android project? How it should be related and connected to the Uri-based data access exposed by a Provider? Any good examples out there?

© Stack Overflow or respective owner

Related posts about android

Related posts about database