Sub StartApp (package As String)
Dim In As Intent
Dim pm As PackageManager
In = pm.GetApplicationIntent(package)
Dim List1 As List
List1.Initialize
List1 = QueryIntent(In)
If In.IsInitialized Then
Try
StartActivity(In)
Log(package & " was started...")
Catch
ToastMessageShow("Starting error...", False)
End Try
Else
ToastMessageShow("Starting error (system)...", False)
End If
End Sub
Sub QueryIntent(Intent1 As Intent) As List
Dim r As Reflector
r.Target = r.GetContext
r.Target = r.RunMethod("getPackageManager")
Dim list1 As List
Try
list1 = r.RunMethod4("queryIntentActivities", Array As Object(Intent1, 0), Array As String("android.content.Intent", "java.lang.int"))
Catch
End Try
Return list1
End Sub