3 Activities and Intents

Chapter Objectives

In this chapter you will:

  Explore an Activity’s lifecycle.

  Learn about saving and restoring an Activity.

  Understand Intents and how they are used with multiple Activities.

  Become familiar with passing data between Activities.

  Implement applications that require basic animation Activity transitions.

  Study Scene transitions.

  3.1 Activity Lifecycle

All Android applications comprise at least one Activity class. In most cases, applications will require the use of several activities. Consider a chess game application that allows opponents to play a game and chat during the game. Such an application, as shown in Figure 3-1, might utilize one activity for chess play and a separate activity ...

Get Android Programming Concepts now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.