Skip to content

Instantly share code, notes, and snippets.

@pwnall
Created September 13, 2020 21:45
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 pwnall/bd303695357365efae95eb6e5c54381f to your computer and use it in GitHub Desktop.
Save pwnall/bd303695357365efae95eb6e5c54381f to your computer and use it in GitHub Desktop.
PackageManager packageManager = getActivity().getPackageManager();
List<ApplicationInfo> applicationInfos =
packageManager.getInstalledApplications(PackageManager.GET_META_DATA);
Log.e("ConfirmImportantSitesDialogFragment", applicationInfos.toString());
for (ApplicationInfo applicationInfo : applicationInfos) {
// Log.e("ConfirmImportantSitesDialogFragment",
// "ComponentFactory: " + applicationInfo.appComponentFactory);
Log.e("ConfirmImportantSitesDialogFragment",
"ClassName: " + applicationInfo.className);
Log.e("ConfirmImportantSitesDialogFragment",
"ManageSpaceActivity: " + applicationInfo.manageSpaceActivityName);
Log.e("ConfirmImportantSitesDialogFragment",
"Name: " + applicationInfo.name);
Log.e("ConfirmImportantSitesDialogFragment",
"PackageName: " + applicationInfo.packageName);
Log.e("ConfirmImportantSitesDialogFragment",
"SourceDir: " + applicationInfo.manageSpaceActivityName);
if (applicationInfo.metaData == null) {
Log.e("ConfirmImportantSitesDialogFragment", "Metadata: (null)");
} else {
Log.e("ConfirmImportantSitesDialogFragment",
"Metadata: " + applicationInfo.metaData.toString());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment