Dim pm As PackageManager
Dim Icons As BitmapDrawable
Dim Appname As String
Dim Obj1, Obj2, Obj3 As Reflector
Dim size, i, flags As Int
Dim msg, name As String
Obj1.Target = Obj1.GetContext
Obj1.Target = Obj1.RunMethod("getPackageManager") ' PackageManager
Obj1.Target = Obj1.RunMethod2("getInstalledPackages", 0, "java.lang.int") ' List<PackageInfo>
size = Obj1.RunMethod("size")
For i = 0 To size -1
Obj2.Target = Obj1.RunMethod2("get", i, "java.lang.int") ' PackageInfo
name = Obj2.GetField("packageName")
Obj3.Target = Obj2.GetField("applicationInfo") ' ApplicationInfo
Icons = pm.GetApplicationIcon(name)
Appname = pm.GetApplicationLabel (name)
AppList.AddTwoLinesAndBitmap ( Appname,name,Icons.Bitmap )