Android examples for android.content.pm:Apk Property
is Apk Debugable
import android.content.Context; import android.content.pm.ApplicationInfo; import android.content.pm.PackageInfo; public class Main { public static boolean isApkDebugable(Context context, String packageName) { try {// w ww . ja va 2 s . co m PackageInfo pkginfo = context.getPackageManager().getPackageInfo(packageName, 1); if (pkginfo != null) { ApplicationInfo info = pkginfo.applicationInfo; return (info.flags & ApplicationInfo.FLAG_DEBUGGABLE) != 0; } } catch (Exception e) { } return false; } }