Created
February 1, 2012 12:40
-
-
Save granoeste/1716840 to your computer and use it in GitHub Desktop.
[Android] Is this application system? Or whether the system is not.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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