question

alexneem avatar image
alexneem asked Raymond Lee Deactivated answered

Config getting cleared when new app is released

Hi,

I have developed a custom tender which communicates to an external API.

The configuration to login to the API is stored using the Android shared preferences.

https://developer.android.com/reference/android/content/SharedPreferences.html

When a new version of our app is released it is pushed to our customers who have the previous version installed. Some customers are reporting in some cases the configuration is being cleared when the new version is installed. It doesn't always happen though. When I side load the app in development the issue doesn't happen either.

Does anyone have any previous experience of this? Is there anything better than shared preferences I can use to stop this happening? It is becoming really urgent for us to resolve this.

Thanks
Alex


App MarketCustom Tenders
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

Raymond Lee avatar image
Raymond Lee Deactivated answered
This person from stackoverflow had similar experiences, where due to an "unknown reason" the SharedPreferences was getting lost on update for some users. The recommendation from that post is to store it in external storage instead to avoid this.
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community