Activities are one of the fundamental building blocks of apps on the Android platform. They serve as the entry point for a user's interaction with an app, and are also central to how a user navigates within an app (as with the Back button) or between apps (as with the Recents button).
Skillfully managing activities allows you to ensure that, for example:
- Orientation changes take place smoothly without disrupting the user experience.
- User data is not lost during activity transitions.
- The system kills processes when it's appropriate to do so.
This section begins by providing an introduction to the concept of activities. It goes on to describe the activity lifecycle in detail. Next, it discusses state changes and how to accommodate them. After that, this section talks about the relationship between activities and intra- and inter-app navigation. Last, this section explains the relationship between activities and the processes that host them.