1
In order not to keep redoing requests that have already been brought from the server I persist them using Sharedpreferences... Only they are created dynamically in my app. example:
// essa key é unica para cada post
// ex: MINHA_KEI_1, depois MINHA_KEI_2, e assim por diante...
SharedPreferences save = contexto.getSharedPreferences(key, Context.MODE_PRIVATE);
SharedPreferences.Editor saveEdit = save.edit();
Gson gson = new Gson();
String jsonPost = gson.toJson(posts);
saveEdit.putString("POST", jsonPost);
saveEdit.commit();
Only after a while, I want to delete all of them so the hand app gets really big.
How to delete all of them at once, even without knowing the KEY?
I thought about creating a sharedPreferences with the generated Keys, and then go through each and delete... I don’t know if there is another way.