Hi all,
I was in the process to update a simple game of mine where the elapsed time is showed.
When the user minimizes the game or switches to a different program (browser, file manager,..) I'd like to stop the timer, record the elapsed time so far in order to continue the game on resume exactly where it was "suspended".
As far as B4XPage_IconifiedChanged is involved, everything seems to work as expected.
But Disappear/Appear and Backgrounf/Foreground are not called when switching to other software on my PC. Disappear/Background are correctly raised at program close (after CloseRequest)
Enabling B4XPages.GetManager.LogEvents shows just the Foreground and Appear events called at app start, but nothing when switching away.
Tried both in Debug and Release.
So the first question is: are events Disappear/Backgound meaningless in Windows or intented for another kind of user action but what I tried so far?
Second question: how would you design the app (B4J side) to account for a "suspended" period of time?
TIA
I was in the process to update a simple game of mine where the elapsed time is showed.
When the user minimizes the game or switches to a different program (browser, file manager,..) I'd like to stop the timer, record the elapsed time so far in order to continue the game on resume exactly where it was "suspended".
As far as B4XPage_IconifiedChanged is involved, everything seems to work as expected.
But Disappear/Appear and Backgrounf/Foreground are not called when switching to other software on my PC. Disappear/Background are correctly raised at program close (after CloseRequest)
Enabling B4XPages.GetManager.LogEvents shows just the Foreground and Appear events called at app start, but nothing when switching away.
Tried both in Debug and Release.
So the first question is: are events Disappear/Backgound meaningless in Windows or intented for another kind of user action but what I tried so far?
Second question: how would you design the app (B4J side) to account for a "suspended" period of time?
TIA