Your First Kotlin Android App - Part 35: Restoring | Ray Wenderlich

When you save the state of your app, you'll want to - at some point - restore it. This video will cover the process.

This is a companion discussion topic for the original entry at

Hey man great tutorial… You might need to check if the game has already started when you are rotating / especially the last part of restoreGame:

    if (timeLeftOnTimer != initialCountDown) {
        gameStarted = true
    } else {
       // to be verbose, probably not needed, given destroyed & and init with false anyways
        gameStarted = false

I’ll take a look and see what I find. Thanks!

1 Like