Update App - Autostart?

thewavemaster

Member
Licensed User
Longtime User
Hello!

I made an alarm clock, using Service Start Foreground. My problem:
Everytime the user updates the app / (or even worse) the app gets updated automatically from the google play market, the running alarm gets killed and of course doesnt restart again.

So lot of users dont remark when the app got updated and are not awaked in the morning by the app...(thats the worst case - the users don't trust the alarm clock anymore....)


Is there any possibility to restart the app after it got updated?

(I think this question is only for the b4a god master Erel :D )
 

Yvon Steinthal

Active Member
Licensed User
It works indeed, as it doesnt bug anymore, however the app still won't restart... Service_Destroy isn't called either so the service is still active, it just doesn't boot the app back up...

As you can see from my log:

** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Service (kioskservice) Create **
** Service (kioskservice) Start **
---- AppUpdating.ReadWebVN
---- AppUpdating.ReadCurVN
Current Version: 1.00
** Service (httputils2service) Create **
** Service (httputils2service) Start **
---- AppUpdating.JobDone --
JobName = JobWebVNonly, Success = true
Read while in JobWebVNonly: ver=1.01
Web version number: 1.01
---- AppUpdating.DownloadApk
---- AppUpdating.JobDone --
JobName = JobApkDownload, Success = true
-- JobApkDownload
newer apk version downloaded and ready to install
---- AppUpdating.InstallApk
user asked to install newer apk
Unexpected event (missing RaiseSynchronousEvents): update_updatecomplete
Check the unfiltered logs for the full stack trace.
** Service (kioskservice) Destroy **
** Activity (main) Pause, UserClosed = false **
** Service (reboot) Create **
** Service (reboot) Start **
Reboot Service Start
Manifest Package:null
** Activity (main) Resume **
PackageAdded: package:b4a.example


<- it should restart here...
 
Upvote 0

Yvon Steinthal

Active Member
Licensed User
I just saw something else, if i press the "View all running apps", the new installed app is there running... but it wont switch to it automatically basically...
 
Upvote 0

Yvon Steinthal

Active Member
Licensed User
It seems to be working since i updated the apk i was downloading... i am unsure as if it is my kiosk service rebooting the app or my "Reboot" service.... doing more tests...

Thank you for your time!
 
Upvote 0
Top