Android Question autostart after update

Discussion in 'Android Questions' started by marcick, Jun 6, 2015.

  1. marcick

    marcick Well-Known Member Licensed User

    Hi All,
    Sorry for repeating the post, but I want to describe better the problem:

    I've got my app to check for an update from my website and if necessary download it then install it. Installation occurs using the following and it all works.

    Code:
    ' here is the Job_Done when download is finished
    Dim i As Intent
    Dim out As OutputStream
    out = 
    File.OpenOutput(File.DirDefaultExternal,"myapp.apk",False )
    File.Copy2(Job.GetInputStream, out)
    out.Close
    i.Initialize(i.ACTION_VIEW, 
    "file://" & File.Combine(File.DirDefaultExternal,"myapp.apk"))
    i.SetType(
    "application/vnd.android.package-archive")
    StartActivity(i)
    What happens is that appears the install screen, I confirm it and after a couple of seconds it disappear and the home-screen is back. Normally the instal screen should remain til installation is finished and you choose "done" or "open".
    When the home-screen is back, if I try to click the app icon it has no effect, because the installation is still running in background. After the needed time, I can click th eicon and the app start.
    So, the problem is just that the installation screen disappear..
    Any idea ?
    Regards,

    Marco
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    It sounds like an issue on your device. Does it also happen when you install an app with B4A-Bridge?
     
  3. marcick

    marcick Well-Known Member Licensed User

    No, no problem at all with b4a bridge. I have the same behaviour on a HTC one and a galaxy tab.
    I will try to test it on a blank project, to see if can be something related to the app.
    I'll be back.
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice