Skip to content

Latest commit

 

History

History
8 lines (5 loc) · 1.43 KB

1.6 -- Android Application Components.md

File metadata and controls

8 lines (5 loc) · 1.43 KB

Components of Android Application

  1. Activities :-: An Activity is User Interface displayed on mobile screen. An Application can have multiple Activities, like one for reading contacts, another for dialling phone number, another for reading call logs, etc. Activities are the Interface through which user interact with Application.

  2. Services :-: A Services is a process which runs in background. Example :-: Application Playing Music, Downloading Files through Browsers, etc. A service will keep running in the background unless your Android OS kill it or your user kill your application from background manually.

  3. Content Providers :-: Content Provider Class is used to share data among other applications in a secure environment with proper permission checks. Content Resolver class is used to access that shared data as client. Example :-: You want to send an PDF file through whatsapp to your friend, But that PDF file is stored in File Manager. In this Example Whatsapp will use ContentResolver Class as client and try to access PDF stored in File Manager. Your File Manager will use ContentProvider Class to share Files with other applications with permissions.

  4. Broadcast Receivers :-: Broadcast Receiver class is used to broadcast some intents or messages within mobile device for other applications and Broadcast Receiver cass can also be used to Receive intents or messages broadcasted by system or application