Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; import android.preference.PreferenceManager; public class Main { public static String getCipher(Context context) { String aes = null; if (context != null) { SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(context); aes = settings.getString("cipher", ""); } return aes; } }