Clear method request
ZionPi opened this issue · 2 comments
ZionPi commented
What if I want to clear all key-value pairs by using one single clear
method?
martino2k6 commented
Good call, I have somehow managed to miss this.
I'm thinking I could provide a @ClearMethod
annotation for this. Alternatively I could also use the existing @RemoveMethod
for the same purpose, but make it behave as clear-all if no @KeyBy...
annotation or key argument has been specified, although this does not seem as clear cut as the first option.
ZionPi commented
PreferenceManager.getDefaultSharedPreferences(context).edit() .clear().commit();
seems do the trick.But if StoreBox can provide a way to specify the name of the sharepreference file to avoid conflict with existed(shiped product) sharepreference file,that will be nice.