Install Intent

Rusty

Well-Known Member
Licensed User
Longtime User
I have been using the following code to install a new version of my APP:
Dim Instl As Intent
Instl.Initialize(Instl.ACTION_VIEW, "file://" & File.Combine(SDCard.Version, Version.NewPackage))
Instl.SetType("application/vnd.android.package-archive")
StartActivity(Instl)

(SDCard.version is a string containing the location)

Until recently, it worked fine. For some reason, the app installs and when you touch OPEN, to start the newly installed app, nothing happens. The OPEN button disappears and whatever was on the screen before the original app (like the home screen) is now visible.
If you touch the APP icon on the home screen, the new program starts right up as desired.
Any advice on what might be causing this?
Thanks, in advance.
 

lagore

Active Member
Licensed User
Longtime User
Hi,
Is there any chance that the file is corrupted, have you still got a previous version that is still working that you can check or have you tried loading the app using B4A IDE and see what happens then.
Edward
 
Upvote 0

Rusty

Well-Known Member
Licensed User
Longtime User
I don't think so, I display the version number on the screen and the original version number changes when I start the app from the home screen.
In other words, Version 1 installs version 2. Both have the version number showing on their screens. Version 1 installs version 2, it says open, then version 2 doesn't start and version 1 has terminated. Touching the icon on the Android, causes the then installed version to start and it is Version 2.
Thanks for the thought though.
 
Upvote 0
Top