mercredi 16 décembre 2015

Correct implementation of asynchronous Android SQLite database

I've Googled around and have found multiple ways of accessing a local SQLite database asynchronously:

  • AsyncTask
  • CursorLoader (I've already used this for a query to retrieve my contacts information, but I'm not sure how this will translate to a SQLiteOpenHelper subclass with multiple queries)
  • ContentProvider - Not sure if it's overkill, the database will only be need from within the app

What is the best practice? I currently have a SQLiteOpenHelper subclass which contains the basic table creation/upgrade/etc. logic.

Aucun commentaire:

Enregistrer un commentaire