Good day, I am building an Android Application. I want to store a set of strings in the Preferences to order to track who used the application based on their log in informat
Create an editor Object first :
SharedPreferences.Editor editor = prefs.edit();
And use the editor object to store and fetch your string set like this :
editor.putStringSet("List", set);
editor.apply();
Set<String> fetch = editor.getStringSet("List", null);
You could write your results to a JSON String and store them in Shared Preferences like this: https://stackoverflow.com/a/5968562/617044
But if you choose to go down the route you're currently on then you're going to have to store a parcelable.
As noted in another answer; you can use putStringSet(), getStringSet() if you're building for API 11+.