Reading_Notes

View the Project on GitHub Hiba-Almade/Reading_Notes

Android Tasks and the Back Stack

Task:

a collection of activities that users interact with when performing a certain job.

>> Two ways to define different launch modes: Using manifest file or using intent flags.

Clearing the back stack :

If the user leaves a task for a long time, the system clears the task of all activities except the root activity.

Activity attributes used to modify behavior: alwaysRetainTaskState, clearTaskOnLaunch, and finishOnTaskLaunch.

> Use the SharedPreferences APIs when you have a relatively small collection of key-values that you’d like to save.

SharedPreferences object :

points to a file containing key-value pairs and provides simple methods to read and write them. Each SharedPreferences file is managed by the framework and can be private or shared.

Can create a new shared preference file or access an existing one by calling one of these methods: