Which data will be deleted, if a user uninstalls an android application
If a user uninstalls an app from his phone, which data is explicitly deleted?
I know that preferences are deleted. What about files on the sd card and about databases created by this app?
If the data on the sd card is not deleted how can I avoid cluttering the users phone if I write larger amounts of data, like images on 开发者_开发百科the sd card?
This was previously addressed here, too:
Android: Delete app associated files from external storage on Uninstall?
Based on that, it looks like files written to the sdcard are not able to be deleted upon application removal.
If this is the case, it seems like a pretty major oversight in the architecture.
In my experience...and I will gladly be corrected.
Databases and files residing in com.example.youapp get deleted. As for the SD-CARD I doubt they will get deleted. What if your app created pictures, then all their pictures would be deleted when the user uninstalled.
As for handling deleting this stuff on uninstall...that is a good question. There may be some sort of handler you can invoke when your app gets uninstalled to help do some extra stuff. Somewhere in the Manifest sounds like it might be a candidate.
精彩评论