Android SharedPreferences in Fragment December 3, 2021 by Codingtube team Here is the top answer of Android SharedPreferences in Fragment SharedPreferences preferences = this.getActivity().getSharedPreferences("pref", Context.MODE_PRIVATE);