Saving the data is done but I am not able to retrieve the data it showing
java.util.HashSet cannot be cast to java.lang.String
Here my code.(Save)
List<String> historyList = new ArrayList<>(); historyList.add(data.get(position).getProductName()); Set<String> set = new HashSet<>(); set.addAll(historyList); preference.save("History", set);
(Retrieve)
Log.d("History", "hhhhhhhhhhhhhhhhh" +preference.readString("History",""));
Please help me to solve this issue.