简体   繁体   中英

Is it possible to clear shared preference using cache memory & if yes then how to clear it?

In android, is it possible to delete data in shared preferences by clearing data in cache memory? if yes then what is happens & if not then why?

Clearing an app's cache does not clear the settings. The settings data (including shared preferences) is stored in a different place than the app's cache. You need to "clear data" to clear out the shared preferences. See this thread , for instance, for more info.

Using SharedPreferences.Editor clear () and commit() will remove all values from the preferences. Do you mean this?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM