reading-notes-ma


Project maintained by mohnalkhateeb Hosted on GitHub Pages — Theme by mattgraham

Intents, Activities, and SharedPreferences

Tasks and the back stack

A task is a collection of activities that users interact with when trying to do something in your app. These activities are arranged in a stack—the back stack—in the order in which each activity is opened.

Lifecycle of a task and its back stack

tasksLifeCycle

Back press behavior for root launcher activities

Background and foreground tasks

Multiple activity instances

Multi-window environments

Manage tasks

you can manage task with attributes in the <activity> manifest element and with flags in the intent that you pass to startActivity().

Define launch modes using Intent flags

Handle affinities

Clear the back stack

Start a task

Save key-value data

Get a handle to shared preferences

Write to shared preferences

Read from shared preferences