Dim a As PackageManager, b As List, b2 As List
b = a.GetInstalledPackages
b2.Initialize
For i=0 To b.Size-1
b2.Add(a.GetApplicationLabel(b.Get(i)))
Next
c = InputList(b2, "Select application:",-1)
If c <> DialogResponse.CANCEL Then
Dim d As Intent
d.Initialize(d.ACTION_VIEW,0) ' without this init i always get error :-(
d = a.GetApplicationIntent(b.Get(c))
If d.IsInitialized Then
Try
StartActivity(d)
Catch
ToastMessageShow("Wrong application, error during starting", False)
End Try
Else
ToastMessageShow("Wrong application, cannot start", False)
End If
End If