SlideShare a Scribd company logo
2
Most read
3
Most read
9
Most read
Android
Components
 - Atul Palandurkar
Android Components
There are 4 basic components of an Android
Application :
 Activity
 Service
 Broadcast Receiver
 Content Provider




http://aatul.me                       - Atul Palandurkar
Activity
 An  Activity represents a single screen with UI.
 Activity class takes care of creating a window in
  which UI can be placed with the method
  setContentView(View)
 While activities are often presented as full screen
  windows, they can also be used as floating
  windows or embedded inside another activity.
 The onCreate(Bundle) is where you initialize your
  activity.
 All activity classes must have a corresponding
  <activity> declaration in their package’s
  AndroidManifest.xml

http://aatul.me                           - Atul Palandurkar
Activity
Life Cycle




http://aatul.me   - Atul Palandurkar
Activity Stack
                   Start             Start               Navigate
                 Activity 2        Activity 3             back


   Foreground
     activity
                                                         Activity
                                                            3
    Activity 1            Activity 1        Activity 1                     Activity 1



                          Activity 2        Activity 2                     Activity 2
    Back Stack

                                                         Activity 3
                                            Activity 3
                                                         destroyed




http://aatul.me                                                       - Atul Palandurkar
Service
A   Service is a component that runs in the
  background to perform long-running operations or
  to perform wok for remote processes.
 Each service class must have a corresponding
  <service> declaration in its package’s
  AndroidManifest.xml
 A service does not provide user interface.
 Another component, such as an activity, can start
  the service and let it run or bind to it in order to
  interact with it.



http://aatul.me                          - Atul Palandurkar
startService()
Service                       Starts the service
Life Cycle                  onStartCommand()

                           Starts actual operation

                           Context.bindService()

                        Obtains data from persistent

                                onStop()
                                    OR
                           Context.stopService()

                  Stops the service, ready to get destroyed

                                onDestroy()
http://aatul.me                            - Atul Palandurkar
Broadcast Receiver
 They    listen to broadcast intents.
 They must be registered (either in code or within the
  AndroidManifest.xml).
 Intent Filters must be used to specify which Intents it
  is listening for.
 A broadcast receiver can be registered using
  multiple intent filters.
 The onReceive() method be overridden to perform
  any operations.




http://aatul.me                            - Atul Palandurkar
Content Provider
 Content  providers are one of the primary building
  blocks of Android applications, providing content
  to applications.
 They encapsulate data & provide it to applications
  through a single interface called ContentResolver.
 A content provider is only required if there us a
  need to share data between multiple applications.
 For example, the contacts data is used by multiple
  applications & must be stored in a content
  provider.



http://aatul.me                        - Atul Palandurkar
Thank You
     Atul Palandurkar
          Blog : http://aatul.me
Training : training@shardainfotech.com
  Website : http://shardainfotech.com
       Contact : 091-9766210353

More Related Content

What's hot (20)

PDF
Android Basic Components
Jussi Pohjolainen
 
PPTX
Android application development ppt
Gautam Kumar
 
PPTX
Creating the first app with android studio
Parinita03
 
PPTX
Mobile operating system
Arindam Ganguly
 
PPTX
Android Widget
ELLURU Kalyan
 
PPTX
Introduction to android
zeelpatel0504
 
PDF
Android Multimedia Support
Jussi Pohjolainen
 
PPT
Mobile Application Development With Android
guest213e237
 
PDF
Location-Based Services on Android
Jomar Tigcal
 
PPTX
Basic android-ppt
Srijib Roy
 
PPT
Introduction to Android
Ranjith Kumar
 
PPT
Android ppt
Ansh Singh
 
PPT
Android Architecture
deepakshare
 
PPTX
Android UI
nationalmobileapps
 
PPTX
Broadcast Receiver
nationalmobileapps
 
ZIP
Android Application Development
Benny Skogberg
 
PPTX
Introduction to Flutter
Apoorv Pandey
 
PPTX
Mobile Operating System
Sonal Poddar
 
PDF
The magic of flutter
Shady Selim
 
PPT
Android Training
Tbldevelopment
 
Android Basic Components
Jussi Pohjolainen
 
Android application development ppt
Gautam Kumar
 
Creating the first app with android studio
Parinita03
 
Mobile operating system
Arindam Ganguly
 
Android Widget
ELLURU Kalyan
 
Introduction to android
zeelpatel0504
 
Android Multimedia Support
Jussi Pohjolainen
 
Mobile Application Development With Android
guest213e237
 
Location-Based Services on Android
Jomar Tigcal
 
Basic android-ppt
Srijib Roy
 
Introduction to Android
Ranjith Kumar
 
Android ppt
Ansh Singh
 
Android Architecture
deepakshare
 
Android UI
nationalmobileapps
 
Broadcast Receiver
nationalmobileapps
 
Android Application Development
Benny Skogberg
 
Introduction to Flutter
Apoorv Pandey
 
Mobile Operating System
Sonal Poddar
 
The magic of flutter
Shady Selim
 
Android Training
Tbldevelopment
 

Similar to Android Components (20)

PPTX
App Fundamentals and Activity life cycle.pptx
ridzah12
 
PPTX
Unit2
DevaKumari Vijay
 
PPTX
02. Android application development_Lec2.pptx
anychowdhury2
 
PPTX
Android application componenets for android app development
BalewKassie
 
PPTX
Introduction to Android Development
Owain Lewis
 
PPTX
Basics 4
Michael Shrove
 
PDF
Android Development Tutorial
Germán Bringas
 
PDF
android_mod_3.useful for bca students for their last sem
aswinbiju1652
 
PPTX
Data Transfer between Activities & Databases
Muhammad Sajid
 
PDF
04 programmation mobile - android - (db, receivers, services...)
TECOS
 
DOCX
Android Application Components with Implementation & Examples
Dr. Chandrakant Divate
 
PDF
Android Application Components
JAINAM KAPADIYA
 
PPTX
Android components by sai gopi
Saigopi Narimeti
 
ODP
Ppt 2 android_basics
Headerlabs Infotech Pvt. Ltd.
 
DOCX
Android building blocks and application life cycle-chapter3
Dr. Ramkumar Lakshminarayanan
 
PPTX
Unit 5 Activity and Activity Life Cycle.pptx
ShantanuDharekar
 
PPTX
Android intents, notification and broadcast recievers
Utkarsh Mankad
 
PDF
Yourstory Android Workshop
Arvind Devaraj
 
PDF
Introduction to Android Programming
CourseHunt
 
PPTX
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
MugiiiReee
 
App Fundamentals and Activity life cycle.pptx
ridzah12
 
02. Android application development_Lec2.pptx
anychowdhury2
 
Android application componenets for android app development
BalewKassie
 
Introduction to Android Development
Owain Lewis
 
Basics 4
Michael Shrove
 
Android Development Tutorial
Germán Bringas
 
android_mod_3.useful for bca students for their last sem
aswinbiju1652
 
Data Transfer between Activities & Databases
Muhammad Sajid
 
04 programmation mobile - android - (db, receivers, services...)
TECOS
 
Android Application Components with Implementation & Examples
Dr. Chandrakant Divate
 
Android Application Components
JAINAM KAPADIYA
 
Android components by sai gopi
Saigopi Narimeti
 
Ppt 2 android_basics
Headerlabs Infotech Pvt. Ltd.
 
Android building blocks and application life cycle-chapter3
Dr. Ramkumar Lakshminarayanan
 
Unit 5 Activity and Activity Life Cycle.pptx
ShantanuDharekar
 
Android intents, notification and broadcast recievers
Utkarsh Mankad
 
Yourstory Android Workshop
Arvind Devaraj
 
Introduction to Android Programming
CourseHunt
 
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
MugiiiReee
 
Ad

More from Aatul Palandurkar (8)

PDF
Franchise Proposal
Aatul Palandurkar
 
PPTX
Adopt a JSR
Aatul Palandurkar
 
PPTX
NetCAT
Aatul Palandurkar
 
PDF
Architecture of Android
Aatul Palandurkar
 
PDF
Android & Why Mobile Application Development
Aatul Palandurkar
 
PDF
NetBeans IDE & Platform
Aatul Palandurkar
 
PPT
Netbeans IDE & Platform
Aatul Palandurkar
 
Franchise Proposal
Aatul Palandurkar
 
Adopt a JSR
Aatul Palandurkar
 
Architecture of Android
Aatul Palandurkar
 
Android & Why Mobile Application Development
Aatul Palandurkar
 
NetBeans IDE & Platform
Aatul Palandurkar
 
Netbeans IDE & Platform
Aatul Palandurkar
 
Ad

Recently uploaded (20)

PDF
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
PDF
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
PPTX
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
PPTX
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
PPTX
SD_GMRC5_Session 6AB_Dulog Pedagohikal at Pagtataya (1).pptx
NickeyArguelles
 
PPTX
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
PPTX
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
PDF
Workbook de Inglés Completo - English Path.pdf
shityouenglishpath
 
PPTX
Light Reflection and Refraction- Activities - Class X Science
SONU ACADEMY
 
PPTX
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
PDF
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
PDF
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
PPTX
ENG8_Q1_WEEK2_LESSON1. Presentation pptx
marawehsvinetshe
 
PDF
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
PDF
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
PPTX
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
PDF
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
PDF
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
PPTX
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PPTX
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 
Is Assignment Help Legal in Australia_.pdf
thomas19williams83
 
Vani - The Voice of Excellence - Jul 2025 issue
Savipriya Raghavendra
 
DIGITAL CITIZENSHIP TOPIC TLE 8 MATATAG CURRICULUM
ROBERTAUGUSTINEFRANC
 
Universal immunization Programme (UIP).pptx
Vishal Chanalia
 
SD_GMRC5_Session 6AB_Dulog Pedagohikal at Pagtataya (1).pptx
NickeyArguelles
 
Identifying elements in the story. Arrange the events in the story
geraldineamahido2
 
Post Dated Cheque(PDC) Management in Odoo 18
Celine George
 
Workbook de Inglés Completo - English Path.pdf
shityouenglishpath
 
Light Reflection and Refraction- Activities - Class X Science
SONU ACADEMY
 
How to Configure Re-Ordering From Portal in Odoo 18 Website
Celine George
 
Stokey: A Jewish Village by Rachel Kolsky
History of Stoke Newington
 
Android Programming - Basics of Mobile App, App tools and Android Basics
Kavitha P.V
 
ENG8_Q1_WEEK2_LESSON1. Presentation pptx
marawehsvinetshe
 
STATEMENT-BY-THE-HON.-MINISTER-FOR-HEALTH-ON-THE-COVID-19-OUTBREAK-AT-UG_revi...
nservice241
 
Characteristics, Strengths and Weaknesses of Quantitative Research.pdf
Thelma Villaflores
 
How to Create Odoo JS Dialog_Popup in Odoo 18
Celine George
 
Aprendendo Arquitetura Framework Salesforce - Dia 03
Mauricio Alexandre Silva
 
Biological Bilingual Glossary Hindi and English Medium
World of Wisdom
 
Nitrogen rule, ring rule, mc lafferty.pptx
nbisen2001
 
PPT-Q1-WK-3-ENGLISH Revised Matatag Grade 3.pptx
reijhongidayawan02
 

Android Components

  • 2. Android Components There are 4 basic components of an Android Application :  Activity  Service  Broadcast Receiver  Content Provider http://aatul.me - Atul Palandurkar
  • 3. Activity  An Activity represents a single screen with UI.  Activity class takes care of creating a window in which UI can be placed with the method setContentView(View)  While activities are often presented as full screen windows, they can also be used as floating windows or embedded inside another activity.  The onCreate(Bundle) is where you initialize your activity.  All activity classes must have a corresponding <activity> declaration in their package’s AndroidManifest.xml http://aatul.me - Atul Palandurkar
  • 5. Activity Stack Start Start Navigate Activity 2 Activity 3 back Foreground activity Activity 3 Activity 1 Activity 1 Activity 1 Activity 1 Activity 2 Activity 2 Activity 2 Back Stack Activity 3 Activity 3 destroyed http://aatul.me - Atul Palandurkar
  • 6. Service A Service is a component that runs in the background to perform long-running operations or to perform wok for remote processes.  Each service class must have a corresponding <service> declaration in its package’s AndroidManifest.xml  A service does not provide user interface.  Another component, such as an activity, can start the service and let it run or bind to it in order to interact with it. http://aatul.me - Atul Palandurkar
  • 7. startService() Service Starts the service Life Cycle onStartCommand() Starts actual operation Context.bindService() Obtains data from persistent onStop() OR Context.stopService() Stops the service, ready to get destroyed onDestroy() http://aatul.me - Atul Palandurkar
  • 8. Broadcast Receiver  They listen to broadcast intents.  They must be registered (either in code or within the AndroidManifest.xml).  Intent Filters must be used to specify which Intents it is listening for.  A broadcast receiver can be registered using multiple intent filters.  The onReceive() method be overridden to perform any operations. http://aatul.me - Atul Palandurkar
  • 9. Content Provider  Content providers are one of the primary building blocks of Android applications, providing content to applications.  They encapsulate data & provide it to applications through a single interface called ContentResolver.  A content provider is only required if there us a need to share data between multiple applications.  For example, the contacts data is used by multiple applications & must be stored in a content provider. http://aatul.me - Atul Palandurkar
  • 10. Thank You Atul Palandurkar Blog : http://aatul.me Training : [email protected] Website : http://shardainfotech.com Contact : 091-9766210353