When the screen is locked, the GameActivity is paused and destroyed, then it is recreated, started, paused, and destroyed again. This causes the music to stop, then start briefly for a second before stopping again.
We need to handle this case to avoid re-initializing the game when it happens.
When the screen is locked, the GameActivity is paused and destroyed, then it is recreated, started, paused, and destroyed again. This causes the music to stop, then start briefly for a second before stopping again.
We need to handle this case to avoid re-initializing the game when it happens.
See: https://stackoverflow.com/questions/16320040/android-oncreate-is-called-after-locking-the-screen