App Components Application= Set of Android Components Activity Ul Component typically correspo one screen BroadcastReceiver Responds to notifications or statu changes Can wake up your proc 3 Service Faceless task that runs in th background ContentProvider. Enable applications to share
App Components Application= Set of Android Components • UI Component typically corresponding to Activity one screen. • Responds to notifications or status changes. Can wake up your process. BroadcastReceiver • Faceless task that runs in the background. Service ContentProvider • Enable applications to share data. Intent
App Components Application= Set of Android Components Activities 1. Provides User Interface 2. Usually represents a Single Screen 3. Can contain one/more Views 4. Extends the Activity Base class Moonlight Sonata Listen Now My Library America Town Moonlight Sonata Amencan idiot Presto ap tato 12
12 App Components Activities 1. Provides User Interface 2. Usually represents a Single Screen 3. Can contain one/more Views 4. Extends the Activity Base class Application= Set of Android Components
App Components Application= Set of Android Components Activities Services 1. Provides User Interface 1.No User Interface 2. Usually represents a Single Screen 2. Runs in Background to handle 3. Can contain one/more Views long running operations 4. Extends the Activity Base class Connected with Intents Faceless task that runs in the background for long running operations 13
13 App Components Activities 1. Provides User Interface 2. Usually represents a Single Screen 3. Can contain one/more Views 4. Extends the Activity Base class Services 1. No User Interface 2. Runs in Background to handle long running operations Application= Set of Android Components Connected with Intents Faceless task that runs in the background for longrunning operations
App Components Application= Set of Android Components Activities Home 1. Provides User Interface 是卷卷卷卷卷卷卷卷卷 2. Usually represents a Single Screen 3. Can contain one/more Views 4. Extends the Activity Base class Connected with Intents Responds to notifications Intent/Broadcast receiver /status changes/events 1. Receives and Reacts to broadcast o Incoming phone call Intents o Battery low 2. No UI but can start an Activity Alarm 14
14 App Components Activities 1. Provides User Interface 2. Usually represents a Single Screen 3. Can contain one/more Views 4. Extends the Activity Base class Application= Set of Android Components • Responds to notifications /status changes/events o Incoming phone call o Battery low o Alarm o … Intent/Broadcast Receiver 1. Receives and Reacts to broadcast Intents 2. No UI but can start an Activity Connected with Intents
App Components Application= Set of Android Components Activities 1. Provides User Interface 2. Usually represents a Single Screen 3. Can contain one/more Views ncan ldiot i Amercan idiot 4. Extends the Activity Base class Dago sostenuto Connected with Intents ° Enable applications to Content Provider share data Makes application data available o Retrieve icon songs from to other apps other musIc app 2. Data stored in SQLite database o Retrieve contact books to recommend music to friends 15
• Enable applications to share data o Retrieve icon, songs from other music app o Retrieve contact books to recommend music to friends 15 App Components Activities 1. Provides User Interface 2. Usually represents a Single Screen 3. Can contain one/more Views 4. Extends the Activity Base class Application= Set of Android Components Content Provider 1. Makes application data available to other apps 2. Data stored in SQLite database Connected with Intents