Java tutorial
//package com.java2s; //License from project: Apache License import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageManager; import android.os.Bundle; public class Main { public static boolean isFirstPublish(Context context) { try { ApplicationInfo ai = context.getPackageManager().getApplicationInfo(context.getPackageName(), PackageManager.GET_META_DATA); Bundle bundle = ai.metaData; return bundle.getBoolean("FIRST_LAUNCHER"); } catch (PackageManager.NameNotFoundException e) { return false; } } }