I would like to know does Android caches an application preference?
I have an activity running.
And then I go to Setting->Manage Application->find my application-> clear data.
But from my activity, the value of a preference in my application stays the same, despite I clear it thru the above step.
But then when I power off and then power on the phone, that seems to clear it.
My question is does android some how cache an application preference?
Thank you.
I presume you mean
SharedPreferencesby telling Application Preference..Android clears the preference files when you do
clear data..The application data(the values read from the preference files before it was cleared) stays in the memory until the app is killed by the system, that might be the reason why you are seeing that the value of preference stays same..
Try
Clear DataandForce Close.. That should give you what you are expecting..