I’m working with SQLite in my android project. There is a feature that is clear to me — if there are multiple threads working with DB then they should use only ONE instance of DBHelper and SQLite guarantee a safe access (even if it is concurrent) to the DB.
But I still have one thing needed to be clarified. How should I manage with DB connection (SQLiteDatabase object)? How often should I call geWritableDatabase() and close()? Is it ok if I call these methods once? Or it’s better to obtain SQLDatabase object and close one every time I perform read/write operation on DB?
I’m working with SQLite in my android project. There is a feature that is
Share
It is handled by default… I mean if a writtable database open, whenever you try to access read-only database it closes writtable one and create new read-only database instance. As far as i know 🙂