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;
import android.content.SharedPreferences.Editor;

public class Main {
    public static final String APPLICATION_NAME = "cludDoctor";

    public static void setBooleanPref(Context context, String name, boolean value) {
        SharedPreferences prefs = context.getSharedPreferences(APPLICATION_NAME, Context.MODE_PRIVATE);
        Editor ed = prefs.edit();
        ed.putBoolean(name, value);
        ed.commit();
    }
}