Skip to content

Instantly share code, notes, and snippets.

@granoeste
Created February 1, 2012 12:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save granoeste/1716840 to your computer and use it in GitHub Desktop.
Save granoeste/1716840 to your computer and use it in GitHub Desktop.
[Android] Is this application system? Or whether the system is not.
final PackageManager pm = getPackageManager();
final List<ApplicationInfo> appInfos = pm.getInstalledApplications(Context.BIND_AUTO_CREATE);
for (final ApplicationInfo appInfo : appInfos) {
// Determination of the bit flag.
if( (appInfo.flags & ApplicationInfo.FLAG_SYSTEM) == 1) {
Log.d("ApplicationInfo[SYSTEM]",appInfo.toString());
} else {
Log.d("ApplicationInfo[NOT SYSTEM]",appInfo.toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment