Android Building Blocks
Android Building Blocks
Android Building Blocks
Vivek Nadar
Application Components
What is an Activity ?
An Activity means a single screen with a user interface.
An application usually consists of multiple activities
that are loosely bound to each other.
Activity generally provides a user with an interactive screen to do
something like:
Dialing the phone, Viewing a map, etc.
Every screen in an application,is an activity by itself.
Intents
1) Implicit
Implicit does not specify a component. Instead,it includes enough
information for the system to determine which of the available
components is best to run for that intent.
Example :
Intent webIntent = new
Intent(Intent.ACTION_VIEW,Uri.parse("http://www.google.com"));
startActivity(webIntent);
Intents...(2)
2) Explicit Intents
Program Demo
2. Services
A Task that runs in the background without
the user's direct interaction.
Examples
Network Downloads
Playing Music
Program Demo
3. Broadcast receiver
Broadcast receiver...(2)
4. Content Providers