Dependencies and prerequisites
How to create an Android project (see Creating an Android
Project)
You should also read
Try it out
Download the demo
ActivityLifecycle.zip
As a user navigates through, out of, and back to your app, the
Within the lifecycle callback methods, you can declare how your activity behaves when the
user leaves and re-enters the activity. For example, if you're building a streaming video player,
you might pause the video and terminate the network connection when the user switches to another
app. When the user returns, you can reconnect to the network and allow the user to resume the video
from the same spot.
This class explains important lifecycle callback methods that each
Lessons
Learn the basics about the activity lifecycle, how the user can launch your app, and how
to perform basic activity creation.
Learn what happens when your activity is paused (partially obscured) and resumed and what you
should do during these state changes.
Learn what happens when the user completely leaves your activity and returns to it.
Learn what happens when your activity is destroyed and how you can rebuild the activity
state when necessary.