i tested my
Ranch Rush APK and it keeps running when minimized. my game allows 20 seconds of play at a time and when i leave & return to it the timer has dropped/has run down completely = end of game, which is what i think is happening with yours.
i inquired on Discord and received the following:
KevinCross wrote: "...You basically need to store the time every frame into a variable and then with GetResumed() calculate the difference between Timer() or GetMillisecond() and the variable that stored the same timer command the last frame.
With this you can calculate how long the game was minimised..."
So, Timer()/GetMilliseconds() keeps ticking and you can use the time difference to detect when the App has lost focus.
kevin provided some code which i took a little further:
GLOBAL Duration#, LastFrame#
do
Print(Duration#)
If GetResumed()
Duration# = Timer() - LastFrame#
Pause()
EndIf
LastFrame# = Timer()
Print("Has Focus")
Sync()
loop
Function Pause()
Repeat
Print("Paused - Click to Continue")
Render()
Swap()
Until GetPointerPressed()
EndFunction
somewhere along these lines is the key to what i think we both are experiencing. perhaps a running Duration# that could also tell us that the app has lost focus (regardless of GetResumed()) and be sent to pause() is ideal.
otherwise, if this is what your sister is experiencing, it's odd that your kindle doesn't do the same. it seems it's stopping Timer()?
hope this helps. do post if you further the notion as we would all be interested.
finally, if this IS what you're experiencing, it would apply beyond android so perhaps this thread should be moved to AppGameKit Classic (where more eyes tend to be)? if you somehow determine that YOUR issue is android-specific (since i have no idea what your app is doing), then we'll leave the thread here. let me know.