Updated: Sat Jan 14 11:07:27 2017, By Contribute to this page
This article describes how to save the Player state when the application moves to the background, which can occur in a number of situations. The application is designed to handle a number of background states, including:
- The end user tapped the Home button.
- The end user pressed the power button.
- Viewing was interrupted by a telephone call or similar interruption.
Background State: Home Button and Phone Call Interuption
- In the onPause() method, call:
trueif you want to save the state and
falseif you want to go back to the pause state.
- In the onResume() method, call :
Background State: Power Button
- In the onPause() method, call :
- In the onResume() method, call:
pause(), depending on the application’s behavior.