I'm using an SQLiteDatabase. Records are displayed on the screen and I have a method loadRecords() which loads and displays records.
I create a dialog for adding a record. The callback calls loadRecords() but the new records don't appear. I must invoke it myself by pressing a button which calls the same method, loadRecords()... then the new ones appear.
I am not using another thread or an async task so I can't understand why this is. So my question is: Are DB writes done asynchronously? (hence why my records don't load). How can I handle this? Is there a way to wait until the db has been fully written to?
Aucun commentaire:
Enregistrer un commentaire