-
Notifications
You must be signed in to change notification settings - Fork 0
Android: Tasks and Shared Preferences
James Dansie edited this page Oct 21, 2019
·
2 revisions
Activities are stored in a back stack. As they move through the app, each activity goes on the "back stack". When the user is done with the activity and presses back, that activity pops off the stack, and goes back to the previous activity. Only the activity on top of the stack is running. All the other activities are stopped, but their state is saved so they can resume later. An activity can be declared as the entry point with the following;
<activity ... >
<intent-filter ... >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
...
</activity>
Shared preferences can be used to store small datasets as key value pairs that can be shared from one app to another.