NrNazifi
NrNazifi

Reputation: 1651

update version of application in android without missing content

I created an Android app. The app needs some contents (sounds, XML and ...) those user must download from internet. Now, I want to provide service for users which update app version, without losing apps content.

Could someone advice me how to do it?

Upvotes: 2

Views: 168

Answers (1)

Mostafa
Mostafa

Reputation: 28086

I you've ever reinstalled an app, you should have seen the dialog by PackageInstaller that says "All user data is preserved." Data you store in SharedPreferences, SQLite database, or SD card are just there and won't be cleared by update.

But if you want to uninstall your app before installing a new one, the only place you can store your data is SD card.

By the way, SD card is also the most appropriate place for storing downloaded files.

Upvotes: 3

Related Questions