开发者

SharedPreferences file not being removed on uninstall

开发者 https://www.devze.com 2023-03-31 06:46 出处:网络
I have a suspicion that this might be due to my running a custom rom... but I figured I should at least come by and ask here.

I have a suspicion that this might be due to my running a custom rom... but I figured I should at least come by and ask here.

I'm working on an app that uses some SharedPreferences. Everything in that aspect works fine, but after completely uninstalling and then installing again, I found that my SharedPreferences values were still being picked up. I ended up uninstalling and then pulling up an adb shell and found that indeed... under /dbdata/databases/mypackagename/shared_prefs/ there were still files there. I would assume开发者_如何学编程 that they should have been removed...

I'm using a Samsung Captivate running the Serendipity rom... Again, I can only imagine that that has something to do with it, but I'm not certain.

Edit - I just completely wiped clean and put on the Firefly Rom and tested this out, experiencing the same thing. Is this possibly a Froyo bug (both have been 2.2 Roms)?


Try this on a stock ROM, I've never heard of this problem before.


It is probably the custom ROM. When an application is removed or the Clear Data is clicked in the settings, it not only removes the the application, but also the data that is specific to it.

A custom ROM will not always do it, it would remove the application but store the files.

For the most part, the reason is accessibility, in the sense that when you say uninstall an app (i.e. Game) because of frustration, when you come back, you data is still available for use.

As developers this may get annoying but may users tend to like the ability to reinstalling an app and having the same information.

0

精彩评论

暂无评论...
验证码 换一张
取 消