卸载时删除共享首选项

时间:2017-01-16 13:31:50

标签: android local-storage sharedpreferences

我的应用中有一个奇怪的错误。从我所看到的,它只发生在较新的设备中。 当我卸载应用程序并再次安装它时,我注意到某些键保留在共享首选项中,即使它们之前已被删除。

For example :
 1. User "abc" is logged in. 
 2. He logs out(his id is then erased from sharedpreferences by setting empty string value in the id key). 
 3. uninstalls the app
 4. installs it again
 5. on launching the app the "id" key exists in the shared preferences. 

但它并没有在所有设备上发生,所以我猜它可能与某些Android操作系统版本有关..

0 个答案:

没有答案
相关问题