Java tutorial
//package com.java2s; import android.app.Activity; import android.content.Context; import android.content.SharedPreferences; public class Main { public static final String AUTO_STATE_FLAG = "auto_state_flag"; public static void resetStartServiceFlag(Context context) { SharedPreferences sp = context.getSharedPreferences("you_notification", Activity.MODE_PRIVATE); sp.edit().putString(AUTO_STATE_FLAG, "1").commit(); } }