Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.content.pm.ApplicationInfo; public class Main { private static Boolean isDebug = null; public static void debugMode(Context context) { if (isDebug == null) { isDebug = context.getApplicationInfo() != null && (context.getApplicationInfo().flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0; } } }