I have this code to get a list of all applications on the system:
PackageManager Pm = GetPackageManager (); Intent Main Intent = New Intent (Intent.ACTION_MAIN); & Lt; ResolveInfo & gt; InstallApps = pm.queryIntentivities (key component, 0); For (ResolveInfo Alm: Installed Apes) {String Package Name = elem.activityInfo.applicationInfo.packageName; Log.i ("TAG", PackageName); } But the results in the installed app show several repeated package names. Is this possible? Is this a "failure" of the 'purpose' or because many app package names have the same name?
Is it possible?
Sure.
A "failure" reason for this 'purpose'
No, at least for my definition of "failure".
Or because many app package names have the same name?
No.
This is because you are inquiring about activities , no application . An app can have activities of zero, one, two or one lakh, which is a ACTION_MAIN intent .
No comments:
Post a Comment