Skip to content Skip to sidebar Skip to footer

Multiple Connections To Sqlite With Simultaneous Async Tasks

In my scenario it has Sync_Class that syncs, with AsyncTasks in background , from my app to my server. Every time that my app does one action that need to change data from my SQLi

Solution 1:

Finally I solved the problem!! The problem is that I try to control the acceses to the database, opening and closing the databases when I need read or write in the databases with parallel programming (background asyncTasks). Must remember that I don't use SQLiteHelper and I solved the problem calling my database class one time per activity, this mean open my database one time and close this when my app is pause and reconect with BDD when my app come in first plane other time then connects with my database.

In resume, never close your database and you can use a parallel programming with multiple accesses in SQLite. Greetings!!

Post a Comment for "Multiple Connections To Sqlite With Simultaneous Async Tasks"