How do i clear the entire shared preferences folder in the users sandbox not just default. The shared_pref folder is located here usually from adb shell:
/data/data/yourappsPackage/shared_prefs
So i have created many different shared prefs xml files.
for example i created them like this:
context.getSharedPreferences("pref_file1",Context.MODE_PRIVATE);
context.getSharedPreferences("pref_file2",Context.MODE_PRIVATE);
context.getSharedPreferences("pref_file3",Context.MODE_PRIVATE);
Now i would like to clear them all with a single command ? This is what i have tried so far:
sharedPreferences.editor.clear() ;
but doesn't this only clear the file that im currently using ?
I've tried:
preference=context.getSharedPreferences("pref_file1",Context.MODE_PRIVATE);
preferences.edit().clear().commit();
and pref_file1 gets cleared but i need pref_file2 and pref_file3 to get cleared also.