I have an application with like 400 records in the database, I have splash screen in the beginning, I have AsyncTask
inserting the data in the database and onPostExecute()
I close the splash screen and the application goes. Ofcourse I want this to happen only one time so when the user open the app in another time he don't occur duplication of data. So I created boolean SharedPrefernces
for first visit. Now the question is, suppose I updated the application in the market, the user will have to replace the application, does the sharedprefernces value get back to the default?
I know that I have to insert the data inside onCreate()
of the database handler/helper but it takes time to insert 400 records with many fields, so I made the splash screen with background execution.
Please tell me if what i'm doing is OK or I need to change the structure and put the insertion inside onCreate()
.
Thank you.