Bookmark and Share

Front Back
Process != Application
In Android, an application can be \"alive\" even if its process has been killed. During its lifetime, each activity of an Android program can be in one of several states: onCreate(Bundle) onStart() onResume() onPause() onStop() onRestart() onDestroy() onSaveInstanceState(Bundle) onRestoreInstanceState(Bundle)
An activity is a user interface screen. Each activity is responsible for saving its own state so it can be restored later.
An intent is a mechanism for describing a specific action. Intents can also be used to pass data fom one activity to another. E.g. - there is an intent for \"send an email\" from a standard email application.
A service is a task thar runs in the background without the user\'s direct interaction. E.g. - a music player would be started by an activity but the code that does the playing should be in a service in order for the music to be played in the background.
Content Providers
A content provider is a set of data wrapped up in a custom API to read and write it. E.g. - Google provides a content provider for contacts.
Dialogs are part of the Activity class and are helpful for creating very simple user interfaces that do not necessitate a new screen or activity to function.
android.util.Log Logging messages are categorized by severity (and vebosity), with errors being the most severe.
Application Context
The application context is the central location for all top-level application functionality. You use the application context to access settings and resources shared across multiple activity instances.
x of y cards