I had developed Android Application which has Login Authentication Page. When the user logs in with valid data, the details are stored in Shared Preferences (shared_prefs folder in data/data/<App_PackageName>/<shared_prefs> folder as SharedPreferences.xml file). So when the user minimizes and maximizes the App, the Shared Preferences is working fine. I recently upgraded the App in the market with updated version Name and Version Code. The users gets the notification and upgrading the App from the market. While launching upgraded version, the app is displaying the Login Auth Page again. I thought that shared Preferences are deleted while upgrading the app, so i changed the storing the details from Prferences.xml to .txt file. The text file is storing in data/data/<App_PackageName>/<files> folder. Here my questions are:
1.The `files` folder and `shared_prefs` folder are stored in cache memory?
2. Whether cache will be cleared while upgrading the app from the market?
Neither are stored in the cache memory, the correct term is private application storage. Application database goes there too. All these will be kept intact when you upgrade the application.
There will be very little use of the application storage if it got erased with every application update right? Imagine yourself having to pass the same troublesome level of a game after each upgrade…
By the way there is a warning that pops out when you are about to upgrade an application, saying explicitly that
your application data will be kept intact.