get Shared Preferences - Android android.content

Android examples for android.content:SharedPreferences

Description

get Shared Preferences

Demo Code

import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

public class Main {

  public static SharedPreferences getSharedPreferences(Context context) {
    SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(context);
    return sharedPreferences;
  }// w  w w.  jav a 2s.  c  o  m

}

Related Tutorials