Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.content.Context;
import android.content.SharedPreferences;

public class Main {
    public static final String PREFS_CACHE_ONE = "prefs_cache_one";

    public static void setEnableGprs(boolean isEnableGprs, Context context) {
        SharedPreferences sp = context.getSharedPreferences(PREFS_CACHE_ONE, 0);
        SharedPreferences.Editor editor = sp.edit();
        editor.putBoolean("isEnableGprs", isEnableGprs);
        editor.commit();
    }
}