What data will be deleted if the user uninstalls the android application

If a user removes an application from their phone, what data is explicitly deleted?

I know the settings are deleted. What about the files on the SD card and about the databases created by this application?

If the data on the SD card is not deleted, how can I avoid cluttering the users phone if I write large amounts of data, for example, images on the SD card?

+4
source share
2 answers

The following was also mentioned here:

Android: delete related application files from external storage when uninstalling?

Based on this, it seems that the files recorded on the SD card cannot be deleted when the application is uninstalled.

If so, it looks like pretty serious oversight in architecture.

+4
source

In my experience ... and I will gladly be corrected.

Databases and files located in com.example.youapp are deleted. Regarding the SD card, I doubt that they will be deleted. What if your application created snapshots, then all their snapshots will be deleted when the user is deleted.

Regarding deleting this file when deleting ... this is a good question. There may be some kind of handler that you can call when your application is uninstalled to help do some extra things. Somewhere in the manifesto it sounds like it could be a candidate.

+2
source

Source: https://habr.com/ru/post/1304447/


All Articles