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 Extends the Activity Base class Connected with Intents Intent/Broadcast Receiver Content Provider 1. Receives and Reacts to broadcast 1. Makes application data available Intents to other apps 2. No Ul but can start an Activity 2. Data stored in SQLite database 16
16 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 Content Provider 1. Makes application data available to other apps 2. Data stored in SQLite database Intent/Broadcast Receiver 1. Receives and Reacts to broadcast Intents 2. No UI but can start an Activity Connected with Intents
Service 17
Service 17
Service An application component that can perform long- running operations in the background and does not provide a user interface o Load music to play o Download,decode and show an email o Download a html from Internet to display ·Vhy Service? o Put the time-consuming job in the background 18
Service • An application component that can perform longrunning operations in the background and does not provide a user interface o Load music to play o Download, decode and show an email o Download a html from Internet to display • Why Service? o Put the time-consuming job in the background 18