I’m creating a dictionary app. My Sqlite database is about 15MB and on the first startup I copy it to the Data folder. I do this in the onCreate Method in the main activity. While copying is in process, the user sees a black screen. I want my app to run and the user to see the main activity and only then have the database copy process start! How I can do this?
I’m creating a dictionary app. My Sqlite database is about 15MB and on the
Share
Create a AsyncTask and do the work there.
It will do the copying on another thread leaving the UI thread free to interact with the user.
It is recommended that you do all heavy work outside the UI thread or your app might become unresponsive.