From Stackoverflow:
You can enumerate all packages and retrieve their services:
How to do it with b4a?
You can enumerate all packages and retrieve their services:
B4X:
List<PackageInfo> pkgs = getPackageManager().getInstalledPackages(PackageManager.GET_SERVICES);
for(PackageInfo pkg : pkgs) {
// You can now use pkg.services
}
How to do it with b4a?
An explanation of the code would also be useful for those who, like me, do not "chew" Java.
I suppose...
List<PackageInfo> is like VB.Net List Of([Type]) and pkgs is declared as this kind of List.
for(PackageInfo pkg : pkgs) is like b4a:
For Each pkg As PackageInfo In pkgs
I suppose...
List<PackageInfo> is like VB.Net List Of([Type]) and pkgs is declared as this kind of List.
for(PackageInfo pkg : pkgs) is like b4a:
For Each pkg As PackageInfo In pkgs
Last edited: