Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; public class Main { public static boolean checkFirstStart(Context paramContext) { SharedPreferences time = paramContext .getSharedPreferences("collection_agent_" + paramContext.getPackageName(), 0); int flag = time.getInt("flag", 0); if (flag == 0) { return true; } return false; } }