Hi,
I've found a little snippet on how to get the App Icon from an APK.
Is it possible to get that working in B4A, maybe with reflection?
It would be nice, if anyone could help me out...
I've found a little snippet on how to get the App Icon from an APK.
Is it possible to get that working in B4A, maybe with reflection?
B4X:
String APKFilePath = "mnt/sdcard/myapkfile.apk"; //For example...
PackageManager pm = getPackageManager();
PackageInfo pi = pm.getPackageArchiveInfo(APKFilePath, 0);
// the secret are these two lines....
pi.applicationInfo.sourceDir = APKFilePath;
pi.applicationInfo.publicSourceDir = APKFilePath;
//
Drawable APKicon = pi.applicationInfo.loadIcon(pm);
String AppName = (String)pi.applicationInfo.loadLabel(pm);
It would be nice, if anyone could help me out...