Search code examples
androidsqlitesharedpreferencesandroid-sqliteandroid-install-apk

Is sharedPreference cleared when an android app is reinstalled?


When we run an app during development on a device is sharedPreference cleared when app is reinstalled ?


Solution

    • If the app is manually uninstalled first and then reinstalled, then yes, SharedPreferences and SQLite tables of the old installation are deleted.
    • If the app is updated from the Play Store or re-run from the IDE without uninstalling the previous version of app first, then SharedPreferences and SQLite tables of the old installation are still present.