Issue With Sqliteopenhelper On Android 2.x And 3.x
So i made a big mistake of testing my code on android 4.0 + and thinking it would work fine on other versions. But i am facing issues with 2.X and 3.X with SQLiteOpenHelper. First
Solution 1:
Not sure if it's a kind of the "best practice" but in my app I never keep the db open. I open and close it before/after almost each CRUD action. It works on Android 2.2.
Solution 2:
The issue was that i was doing these database operations from a widget using asyntasks. While this works perfectly on android 4.0 + devices, however for lesser versions of android i had to first create an activity and do all the database creation and filling up of tables in the application and then have the widget retrieve and display that data.
Post a Comment for "Issue With Sqliteopenhelper On Android 2.x And 3.x"