Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8600235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:34:17+00:00 2026-06-12T01:34:17+00:00

I’ve stored user settings in the SharedPreferences in my App. What will happen with

  • 0

I’ve stored user settings in the SharedPreferences in my App. What will happen with the SharedPreferences when I update the App via Google Play Store to a new version of the App?

Will the SharedPrefernces still be there after the update or will they be deleted?

So far I haven’t found an answer on the web or Stackoverflow.

Can you point me to some links they describe this process?

Edit:
Meanwhile I found an other answer as well: SharedPreferences behaviour on Update/Uninstall

Edit 2:
Time past quite a bit when I first asked this question I recently learned that since Android 6.0 (API 23) it is also possible to use the auto backup functionality to store your shared preferences as described by Google here.

Just add the <application android:allowBackup="true" ... > in your AndroidManifest.xml file.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T01:34:18+00:00Added an answer on June 12, 2026 at 1:34 am

    Cristian here says: your Application data will be remain when user install updates.

    But it must be with the same package name to detect as an update of previous App.

    EboMike in Warning Android user that app update could lead to losing data from old app version? says:

    Quite frankly, losing data due to an upgrade is unacceptable.

    Edit:

    Normally, the SharedPreferences(as well as other user data) will be kept during the update process, but sometimes, due to some “unknown” problem, the data may get lost, and I guess it is out of your control. So, you can simply believe that the SharedPreferences will be kept(see here).

    So,if you want to avoid clearing user’s data in upgrading progress,you have to save main data in external storage(this can be a removable storage media,such as an SD card or an internal,non-removable, storage.) and not private for your App.Or at least put away for user to backup data before upgrading .Then in first run of your (upgraded) App,check that is there any backup file in external storage or no.

    If you like to know What things must/can happen on upgrading an App?,I did not any good description for this.It is complicated and relative with Android Security,Application signing,copy protection and other topics.I mean that if you change state of your App in any above fields,it causes different result.
    For example if you CHANGED COPY PROTECTION FROM ON to OFF OR OFF to ON,your App will be updated but causes all your shared preferences to get lost,file access be impossible and … .
    You although have to be care in about conditions cause your new App being considered as an update for previous App(see Things That Cannot Change).

    Also you have to be care in about your code,it may be caused deleting data of your databases(see update app with preloaded SQLite).

    But ultimately, if be careful,you can say:

    The update process only replaces the apk file(and so what is in it for
    example drawables,…) and does not alter databases,sharedpreferences
    and any other files that generated in run time(probably in this
    case,new App is installed with the UID that is equal to UID of
    previous App).

    You can see these pages for more details:

    Help!? Updating our applicatoin on the market deletes the saved SharedPreferences.
    Market copy protection totally breaks file access after updating
    Can someone explain the App update process?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want use html5's new tag to play a wav file (currently only supported
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
We're building an app, our first using Rails 3, and we're having to build
I need a function that will clean a strings' special characters. I do NOT
I am writing an app with both english and french support. The app requests
I am using Paperclip to handle profile photo uploads in my app. They upload
I have a bunch of posts stored in text files formatted in yaml/textile (from
I need to clean up various Word 'smart' characters in user input, including but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.