I'm developing an application which relies on database (local) - and this database updates frequently.
What I'm trying to achieve is: Suppose the data is shown in a listview. I want the listview to update the dataset as soon as any change in the database happens (or a specific table to be precise).
So far I've thought of these options:
- SQLiteOpenHelper class: whenever an update/insert is done it'll notify the activity to update listview via BroadcastReceiver.
- ContentProvider with CursorLoader (haven't used it before so a little skeptical)
- Something else? Please suggest.
Which is the best way to achieve consistent and immediate updates without blocking the UI (performance)?
Aucun commentaire:
Enregistrer un commentaire