I have been using SharedPreferences
in my app to save details about text files as it is very easy to access and alter. The problem I've encountered is that when I delete the text file, it's difficult to delete the associated SharedPreferences
file as it's stored in different places on different devices and there is no generic getSharedPreferenceDir()
as @CommonsWare mentions here.
My question is this: Is there another method I should be using to store a HashMap
that is as easy to use as SharedPreferences
in terms of creating and retrieving information but is also easy to delete?
I am aware of the sharedPrefs.clear()
method, but I am referring to deleting the actual XML file and not simply clearing its contents. Thanks in advance.