Java tutorial
//package com.java2s; // Licensed under the MIT license. import android.content.Context; import android.content.SharedPreferences; import java.util.HashSet; import java.util.Set; public class Main { public static Set<String> getAllPersonIds(String personGroupId, Context context) { SharedPreferences personIdSet = context.getSharedPreferences(personGroupId + "PersonIdSet", Context.MODE_PRIVATE); return personIdSet.getStringSet("PersonIdSet", new HashSet<String>()); } }