Reputation: 10152
In this document, Google says that:
When the user uninstalls your app, the system removes all your app's files from internal storage.
But does it clear app cache (or any other data inside internal storage) automatically when update app version (for example from v1.0 to v1.1)?
Because when I'm monitoring my company's app, the /cache
folder goes down trend each time we release and users update to new app version.
I did a test on my phones and see that the app cache did decrease size. But I'm not sure all devices also be the same.
Upvotes: 11
Views: 10035
Reputation: 361
Internal storage:
When the user uninstalls your app, the system removes all your app's files from internal storage.
External storage:
getExternalFilesDir()
and rightfully belong to your app and will be deleted when the user uninstalls your app.Yes, it clean data when user uninstalls, but NOT when user updates your app.
Note that some app does implement it's own cleaning mechanism by:
android.intent.action.PACKAGE_REPLACED
using BroadcastReceiver
, then trigger clean some specific data. For detailed information, see this.
Upvotes: 7
Reputation: 49
Uninstall will only remove internal files bundled with the application, folders create in the external storage will not be deleted when uninstall. for database, the database will be deleted when uninstall but will remain for updated application.
Still on the database, its depends on the way the developer built the application, if there is a change of database version, there can be a replace or a complete removal of the database.
Also I'm adding a link that I hope will help you; https://developer.android.com/training/data-storage/files
Good Luck, G.
Upvotes: 1