Sub InstallPackage
Dim i As Intent
i.Initialize(i.ACTION_VIEW, "file://" & File.Combine(FileFolder, FileName))
i.SetType("application/vnd.android.package-archive")
StartActivityForResult(i)
End Sub
Sub ion_Event (MethodName As String, Args() As Object) As Object
LogColor(" INSTALL result " & Args(0), Colors.blue)
' LastActivity = "Main"
If Args.Length > 0 Then
End If
Return Null
End Sub
Sub StartActivityForResult(i As Intent)
Dim jo As JavaObject = GetBA
ion = jo.CreateEvent("anywheresoftware.b4a.IOnActivityResult", "ion", Null)
jo.RunMethod("startActivityForResult", Array As Object(ion, i))
End Sub
Sub GetBA As Object
Dim jo As JavaObject
Dim cls As String = Me
cls = cls.SubString("class ".Length)
jo.InitializeStatic(cls)
Return jo.GetField("processBA")
End Sub