I have used the following code to install a new version of a program after downloading it from the internet
I took the code from Erel's Bridge Source code.
Everything works ok, to a point. When i press the button to "Start Now' nothing happens. I can manually run the new version ok but i want a user to just run straight from the install.
Can anyone see what i am missing?
TIA
Joe
update:
I was just looking at the code and i had originally assumed that i had to exit the installing app. I suppose thinking about it now it is actually terminating the newly installed app. Is this correct?
B4X:
Sub InstallNewApk
'ask the system to install the apk
SQL.Close
Dim i As Intent
i.Initialize(i.ACTION_VIEW, "file://" & File.Combine(File.DirRootExternal, "Waratah.apk"))
i.SetType("application/vnd.android.package-archive")
StartActivity(i)
ExitApplication
End Sub
I took the code from Erel's Bridge Source code.
Everything works ok, to a point. When i press the button to "Start Now' nothing happens. I can manually run the new version ok but i want a user to just run straight from the install.
Can anyone see what i am missing?
TIA
Joe
update:
I was just looking at the code and i had originally assumed that i had to exit the installing app. I suppose thinking about it now it is actually terminating the newly installed app. Is this correct?
Last edited: