I'm working on Android project where I'm collecting some information from web server. Everytime the application starts I'm downloading JSON data and reenter the information in database. I have this scenario :
- Application starts, I'm deleting all data in sqlite database and insert it again (that's needed if there are some changes in json data).
- While I'm downloading the new json user can't see any information because I've already delete it. He can see periodically when the single items are downloaded and insert in database.
- After whole process is done and everything is downloaded and insert user can see all the new available information.
So I need an idea how to do this thing: When I start downloading the data from json when app starts user must be available to see the old info. When I'm ready with all the information and everything is downloaded, the whole JSON I have to delete/update/insert the new data and everything must happen so quick that the user must don't notice that.
Any idea how can I do this?
Thanks in advance!