Java tutorial
//package com.java2s; import android.content.Context; import android.content.SharedPreferences; public class Main { private static final String CONFIG_NAME = "update_config"; private static final String APP_ACTIVE_TIME = "app_active_time"; public static boolean isNewInstall(Context context) { SharedPreferences sp = getSP(context); return !sp.contains(APP_ACTIVE_TIME); } private static SharedPreferences getSP(Context context) { return context.getSharedPreferences(CONFIG_NAME, Context.MODE_PRIVATE); } }