SlideShare a Scribd company logo
Android –
BroadcastReceiver
Yong Heui Cho @ Mokwon University
Some of slides are referred to:
[1] Everything of Android, slideshare.
2
Broadcast Receiver
• An Intent-based publish-
subscribe mechanism.
• Great for listening system
events such as SMS messages.
□ Courtesy to Everything of Android, slideshare.
3
Uses of BR
• A broadcast receiver is a component that
does nothing but receive and react to
broadcast announcements
• Your app can
– Receive and react to system services (example:
battery low)
– Receive and react to other apps broadcast
announcements
– Initiate broadcasts to other apps
□ Courtesy to Everything of Android, slideshare.
4
Register of BR
• To register Broadcast Receiver, you can
– Dynamically register with registerReceiver (in
code)
– Using <register> tag in AndroidManifest.xml
□ Courtesy to Everything of Android, slideshare.
5
Send of Broadcast
• Broadcast is sent using Intent and
sendBroadcast or sendOrderedBroadcast
methods
• Example:
– Intent intent = new
Intent(“com.enlume.MSG_PRO");
sendBroadcast(intent);
□ Courtesy to Everything of Android, slideshare.
6
Normal vs. Ordered
• Normal Broadcasts
– Sent with sendBroadcast. All broadcasts are
run in undefined order, often at the same
time.
• Ordered Broadcasts
– Sent with sendOrderedBroadcast. Each
receiver executes in turn. Possible to
propagate a result to next receiver. Order can
be controlled using android:priority tag.
□ Courtesy to Everything of Android, slideshare.
7
BR Lifecycle
• Broadcast Receiver object is valid only for
the duration of the onReceive(Context,
Intent) method.
– You cannot do anything asynchronous in
here!
– Except you can start a service, which can start
a thread.
□ Courtesy to Everything of Android, slideshare.
8
Event Listener
• Interface to process specific events
9
BR vs. Listener
type BroadcastReceiver Listener
goal class for Intents
class or interface
for Intents &
others
message
mostly global
messages
mostly specific
messages
period
discontinuous
reception
frequent (or
continuous) reception
construction
static (manifest) or
dynamic
dynamic only

More Related Content

What's hot

Face detection presentation slide
Face detection  presentation slideFace detection  presentation slide
Face detection presentation slide
Sanjoy Dutta
 
Mobile platform security models
Mobile platform security modelsMobile platform security models
Mobile platform security models
G Prachi
 
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
RahulSharma4566
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - Notes
Omprakash Chauhan
 
Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)
Kalyan Acharjya
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
Surabhi Ks
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer Graphics
Kamal Acharya
 
Mid point circle algorithm
Mid point circle algorithmMid point circle algorithm
Mid point circle algorithm
Mani Kanth
 
K mean-clustering algorithm
K mean-clustering algorithmK mean-clustering algorithm
K mean-clustering algorithm
parry prabhu
 
Mini Project- Face Recognition
Mini Project- Face RecognitionMini Project- Face Recognition
Edge detection
Edge detectionEdge detection
Edge detection
Jyoti Dhall
 
CS6611 Mobile Application Development Lab Manual-2018-19
CS6611 Mobile Application Development Lab Manual-2018-19CS6611 Mobile Application Development Lab Manual-2018-19
CS6611 Mobile Application Development Lab Manual-2018-19
Gobinath Subramaniam
 
Image processing
Image processingImage processing
Image processing
Varun Raj
 
Raster scan system & random scan system
Raster scan system & random scan systemRaster scan system & random scan system
Raster scan system & random scan system
shalinikarunakaran1
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
Sahil Biswas
 
Video display devices
Video display devicesVideo display devices
Video display devices
shalinikarunakaran1
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.ppt
arunsingh660
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformation
Selvakumar Gna
 
Graphics devices
Graphics devicesGraphics devices
Graphics devices
aa11bb11
 
Fundamentals of Image Processing & Computer Vision with MATLAB
Fundamentals of Image Processing & Computer Vision with MATLABFundamentals of Image Processing & Computer Vision with MATLAB
Fundamentals of Image Processing & Computer Vision with MATLAB
Ali Ghanbarzadeh
 

What's hot (20)

Face detection presentation slide
Face detection  presentation slideFace detection  presentation slide
Face detection presentation slide
 
Mobile platform security models
Mobile platform security modelsMobile platform security models
Mobile platform security models
 
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
Heuristic Search in Artificial Intelligence | Heuristic Function in AI | Admi...
 
Line Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - NotesLine Drawing Algorithms - Computer Graphics - Notes
Line Drawing Algorithms - Computer Graphics - Notes
 
Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)Image Restoration (Digital Image Processing)
Image Restoration (Digital Image Processing)
 
Image enhancement ppt nal2
Image enhancement ppt nal2Image enhancement ppt nal2
Image enhancement ppt nal2
 
Output primitives in Computer Graphics
Output primitives in Computer GraphicsOutput primitives in Computer Graphics
Output primitives in Computer Graphics
 
Mid point circle algorithm
Mid point circle algorithmMid point circle algorithm
Mid point circle algorithm
 
K mean-clustering algorithm
K mean-clustering algorithmK mean-clustering algorithm
K mean-clustering algorithm
 
Mini Project- Face Recognition
Mini Project- Face RecognitionMini Project- Face Recognition
Mini Project- Face Recognition
 
Edge detection
Edge detectionEdge detection
Edge detection
 
CS6611 Mobile Application Development Lab Manual-2018-19
CS6611 Mobile Application Development Lab Manual-2018-19CS6611 Mobile Application Development Lab Manual-2018-19
CS6611 Mobile Application Development Lab Manual-2018-19
 
Image processing
Image processingImage processing
Image processing
 
Raster scan system & random scan system
Raster scan system & random scan systemRaster scan system & random scan system
Raster scan system & random scan system
 
Digital Image Processing
Digital Image ProcessingDigital Image Processing
Digital Image Processing
 
Video display devices
Video display devicesVideo display devices
Video display devices
 
Problem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.pptProblem reduction AND OR GRAPH & AO* algorithm.ppt
Problem reduction AND OR GRAPH & AO* algorithm.ppt
 
Computer graphics basic transformation
Computer graphics basic transformationComputer graphics basic transformation
Computer graphics basic transformation
 
Graphics devices
Graphics devicesGraphics devices
Graphics devices
 
Fundamentals of Image Processing & Computer Vision with MATLAB
Fundamentals of Image Processing & Computer Vision with MATLABFundamentals of Image Processing & Computer Vision with MATLAB
Fundamentals of Image Processing & Computer Vision with MATLAB
 

Similar to Android - Broadcast Receiver

Android - Broadcast Receiver
Android - Broadcast ReceiverAndroid - Broadcast Receiver
Android - Broadcast Receiver
Yong Heui Cho
 
Data Transfer between activities and Database
Data Transfer between activities and Database Data Transfer between activities and Database
Data Transfer between activities and Database
faiz324545
 
Introduction to android - SpringPeople
Introduction to android - SpringPeopleIntroduction to android - SpringPeople
Introduction to android - SpringPeople
SpringPeople
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & Databases
Muhammad Sajid
 
Android Security
Android SecurityAndroid Security
Android Security
Suminda Gunawardhana
 
RAD - System i - Presentation
RAD - System i - PresentationRAD - System i - Presentation
RAD - System i - Presentation
Chuck Walker
 
Broadcast Receiver
Broadcast ReceiverBroadcast Receiver
Broadcast Receiver
NandanAdeshara
 
Broadcast receivers
Broadcast receiversBroadcast receivers
Broadcast receivers
maamir farooq
 
Synapseindia android apps overview
Synapseindia android apps overviewSynapseindia android apps overview
Synapseindia android apps overview
Synapseindiappsdevelopment
 
Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101
Michael Angelo Rivera
 
Android Application Components-BroadcastReceiver_Content Provider.pptx
Android Application Components-BroadcastReceiver_Content Provider.pptxAndroid Application Components-BroadcastReceiver_Content Provider.pptx
Android Application Components-BroadcastReceiver_Content Provider.pptx
KNANTHINIMCA
 
Android Development Tutorial
Android Development TutorialAndroid Development Tutorial
Android Development Tutorial
Germán Bringas
 
Insight User Conference Bootcamp - Multi-Channel with SparkPost Elite
Insight User Conference Bootcamp - Multi-Channel with SparkPost EliteInsight User Conference Bootcamp - Multi-Channel with SparkPost Elite
Insight User Conference Bootcamp - Multi-Channel with SparkPost Elite
SparkPost
 
Learn Android app development in easy steps
Learn Android app development in easy stepsLearn Android app development in easy steps
Learn Android app development in easy steps
Mobile Pundits
 
Security in Android Application
Security in Android ApplicationSecurity in Android Application
Security in Android Application
Rishabh Gupta
 
Security on android
Security on androidSecurity on android
Security on android
pk464312
 
Why Messaging system?
Why Messaging system?Why Messaging system?
Why Messaging system?
Gurpreet singh
 
Basics 4
Basics   4Basics   4
Basics 4
Michael Shrove
 
Androidappdevelopmentpresentation
AndroidappdevelopmentpresentationAndroidappdevelopmentpresentation
Androidappdevelopmentpresentation
Rachit Gaur
 
Deployment Automation for Hybrid Cloud and Multi-Platform Environments
Deployment Automation for Hybrid Cloud and Multi-Platform EnvironmentsDeployment Automation for Hybrid Cloud and Multi-Platform Environments
Deployment Automation for Hybrid Cloud and Multi-Platform Environments
IBM UrbanCode Products
 

Similar to Android - Broadcast Receiver (20)

Android - Broadcast Receiver
Android - Broadcast ReceiverAndroid - Broadcast Receiver
Android - Broadcast Receiver
 
Data Transfer between activities and Database
Data Transfer between activities and Database Data Transfer between activities and Database
Data Transfer between activities and Database
 
Introduction to android - SpringPeople
Introduction to android - SpringPeopleIntroduction to android - SpringPeople
Introduction to android - SpringPeople
 
Data Transfer between Activities & Databases
Data Transfer between Activities & DatabasesData Transfer between Activities & Databases
Data Transfer between Activities & Databases
 
Android Security
Android SecurityAndroid Security
Android Security
 
RAD - System i - Presentation
RAD - System i - PresentationRAD - System i - Presentation
RAD - System i - Presentation
 
Broadcast Receiver
Broadcast ReceiverBroadcast Receiver
Broadcast Receiver
 
Broadcast receivers
Broadcast receiversBroadcast receivers
Broadcast receivers
 
Synapseindia android apps overview
Synapseindia android apps overviewSynapseindia android apps overview
Synapseindia android apps overview
 
Part 2 android application development 101
Part 2 android application development 101Part 2 android application development 101
Part 2 android application development 101
 
Android Application Components-BroadcastReceiver_Content Provider.pptx
Android Application Components-BroadcastReceiver_Content Provider.pptxAndroid Application Components-BroadcastReceiver_Content Provider.pptx
Android Application Components-BroadcastReceiver_Content Provider.pptx
 
Android Development Tutorial
Android Development TutorialAndroid Development Tutorial
Android Development Tutorial
 
Insight User Conference Bootcamp - Multi-Channel with SparkPost Elite
Insight User Conference Bootcamp - Multi-Channel with SparkPost EliteInsight User Conference Bootcamp - Multi-Channel with SparkPost Elite
Insight User Conference Bootcamp - Multi-Channel with SparkPost Elite
 
Learn Android app development in easy steps
Learn Android app development in easy stepsLearn Android app development in easy steps
Learn Android app development in easy steps
 
Security in Android Application
Security in Android ApplicationSecurity in Android Application
Security in Android Application
 
Security on android
Security on androidSecurity on android
Security on android
 
Why Messaging system?
Why Messaging system?Why Messaging system?
Why Messaging system?
 
Basics 4
Basics   4Basics   4
Basics 4
 
Androidappdevelopmentpresentation
AndroidappdevelopmentpresentationAndroidappdevelopmentpresentation
Androidappdevelopmentpresentation
 
Deployment Automation for Hybrid Cloud and Multi-Platform Environments
Deployment Automation for Hybrid Cloud and Multi-Platform EnvironmentsDeployment Automation for Hybrid Cloud and Multi-Platform Environments
Deployment Automation for Hybrid Cloud and Multi-Platform Environments
 

More from Yong Heui Cho

Android - Sensor Manager
Android - Sensor ManagerAndroid - Sensor Manager
Android - Sensor Manager
Yong Heui Cho
 
Android - Message
Android - MessageAndroid - Message
Android - Message
Yong Heui Cho
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
Yong Heui Cho
 
Computing Paradigm
Computing ParadigmComputing Paradigm
Computing Paradigm
Yong Heui Cho
 
TestBCD2018-2(answer)
TestBCD2018-2(answer)TestBCD2018-2(answer)
TestBCD2018-2(answer)
Yong Heui Cho
 
TestSDS2018-2(answer)
TestSDS2018-2(answer)TestSDS2018-2(answer)
TestSDS2018-2(answer)
Yong Heui Cho
 
TestEC2018-2(answer)
TestEC2018-2(answer)TestEC2018-2(answer)
TestEC2018-2(answer)
Yong Heui Cho
 
TestEC2018-1(answer)
TestEC2018-1(answer)TestEC2018-1(answer)
TestEC2018-1(answer)
Yong Heui Cho
 
TestBCD2018-1(answer)
TestBCD2018-1(answer)TestBCD2018-1(answer)
TestBCD2018-1(answer)
Yong Heui Cho
 
TestSDS2018-1(answer)
TestSDS2018-1(answer)TestSDS2018-1(answer)
TestSDS2018-1(answer)
Yong Heui Cho
 
BJT - Analysis of Bias
BJT - Analysis of BiasBJT - Analysis of Bias
BJT - Analysis of Bias
Yong Heui Cho
 
TestCloud2018-2(answer)
TestCloud2018-2(answer)TestCloud2018-2(answer)
TestCloud2018-2(answer)
Yong Heui Cho
 
TestECD2018-1(answer)
TestECD2018-1(answer)TestECD2018-1(answer)
TestECD2018-1(answer)
Yong Heui Cho
 
Test-SDIC2018-2(answer)
Test-SDIC2018-2(answer)Test-SDIC2018-2(answer)
Test-SDIC2018-2(answer)
Yong Heui Cho
 
TestCloud2018-1(answer)
TestCloud2018-1(answer)TestCloud2018-1(answer)
TestCloud2018-1(answer)
Yong Heui Cho
 
Cloud Service Model
Cloud Service ModelCloud Service Model
Cloud Service Model
Yong Heui Cho
 
Test-SDIC2018-1(Answer)
Test-SDIC2018-1(Answer)Test-SDIC2018-1(Answer)
Test-SDIC2018-1(Answer)
Yong Heui Cho
 
RF 증폭기 설계(Design of RF Amplifier)-rev1
RF 증폭기 설계(Design of RF Amplifier)-rev1RF 증폭기 설계(Design of RF Amplifier)-rev1
RF 증폭기 설계(Design of RF Amplifier)-rev1
Yong Heui Cho
 
Computing Paradigm - rev1
Computing Paradigm - rev1Computing Paradigm - rev1
Computing Paradigm - rev1
Yong Heui Cho
 
Cloud Deployment Model
Cloud Deployment ModelCloud Deployment Model
Cloud Deployment Model
Yong Heui Cho
 

More from Yong Heui Cho (20)

Android - Sensor Manager
Android - Sensor ManagerAndroid - Sensor Manager
Android - Sensor Manager
 
Android - Message
Android - MessageAndroid - Message
Android - Message
 
Cloud Computing
Cloud ComputingCloud Computing
Cloud Computing
 
Computing Paradigm
Computing ParadigmComputing Paradigm
Computing Paradigm
 
TestBCD2018-2(answer)
TestBCD2018-2(answer)TestBCD2018-2(answer)
TestBCD2018-2(answer)
 
TestSDS2018-2(answer)
TestSDS2018-2(answer)TestSDS2018-2(answer)
TestSDS2018-2(answer)
 
TestEC2018-2(answer)
TestEC2018-2(answer)TestEC2018-2(answer)
TestEC2018-2(answer)
 
TestEC2018-1(answer)
TestEC2018-1(answer)TestEC2018-1(answer)
TestEC2018-1(answer)
 
TestBCD2018-1(answer)
TestBCD2018-1(answer)TestBCD2018-1(answer)
TestBCD2018-1(answer)
 
TestSDS2018-1(answer)
TestSDS2018-1(answer)TestSDS2018-1(answer)
TestSDS2018-1(answer)
 
BJT - Analysis of Bias
BJT - Analysis of BiasBJT - Analysis of Bias
BJT - Analysis of Bias
 
TestCloud2018-2(answer)
TestCloud2018-2(answer)TestCloud2018-2(answer)
TestCloud2018-2(answer)
 
TestECD2018-1(answer)
TestECD2018-1(answer)TestECD2018-1(answer)
TestECD2018-1(answer)
 
Test-SDIC2018-2(answer)
Test-SDIC2018-2(answer)Test-SDIC2018-2(answer)
Test-SDIC2018-2(answer)
 
TestCloud2018-1(answer)
TestCloud2018-1(answer)TestCloud2018-1(answer)
TestCloud2018-1(answer)
 
Cloud Service Model
Cloud Service ModelCloud Service Model
Cloud Service Model
 
Test-SDIC2018-1(Answer)
Test-SDIC2018-1(Answer)Test-SDIC2018-1(Answer)
Test-SDIC2018-1(Answer)
 
RF 증폭기 설계(Design of RF Amplifier)-rev1
RF 증폭기 설계(Design of RF Amplifier)-rev1RF 증폭기 설계(Design of RF Amplifier)-rev1
RF 증폭기 설계(Design of RF Amplifier)-rev1
 
Computing Paradigm - rev1
Computing Paradigm - rev1Computing Paradigm - rev1
Computing Paradigm - rev1
 
Cloud Deployment Model
Cloud Deployment ModelCloud Deployment Model
Cloud Deployment Model
 

Recently uploaded

Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
TheSMSPoint
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
Green Software Development
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
SOCRadar
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
lorraineandreiamcidl
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
Sven Peters
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
Aftab Hussain
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
Rakesh Kumar R
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
aymanquadri279
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
Rakesh Kumar R
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Undress Baby
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
Philip Schwarz
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
Łukasz Chruściel
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
Peter Muessig
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
Yara Milbes
 

Recently uploaded (20)

Transform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR SolutionsTransform Your Communication with Cloud-Based IVR Solutions
Transform Your Communication with Cloud-Based IVR Solutions
 
Energy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina JonuziEnergy consumption of Database Management - Florina Jonuzi
Energy consumption of Database Management - Florina Jonuzi
 
socradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdfsocradar-q1-2024-aviation-industry-report.pdf
socradar-q1-2024-aviation-industry-report.pdf
 
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOMLORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
LORRAINE ANDREI_LEQUIGAN_HOW TO USE ZOOM
 
Microservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we workMicroservice Teams - How the cloud changes the way we work
Microservice Teams - How the cloud changes the way we work
 
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit ParisNeo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
Neo4j - Product Vision and Knowledge Graphs - GraphSummit Paris
 
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeA Study of Variable-Role-based Feature Enrichment in Neural Models of Code
A Study of Variable-Role-based Feature Enrichment in Neural Models of Code
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
How to write a program in any programming language
How to write a program in any programming languageHow to write a program in any programming language
How to write a program in any programming language
 
What is Master Data Management by PiLog Group
What is Master Data Management by PiLog GroupWhat is Master Data Management by PiLog Group
What is Master Data Management by PiLog Group
 
Fundamentals of Programming and Language Processors
Fundamentals of Programming and Language ProcessorsFundamentals of Programming and Language Processors
Fundamentals of Programming and Language Processors
 
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfRevolutionizing Visual Effects Mastering AI Face Swaps.pdf
Revolutionizing Visual Effects Mastering AI Face Swaps.pdf
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Hand Rolled Applicative User Validation Code Kata
Hand Rolled Applicative User ValidationCode KataHand Rolled Applicative User ValidationCode Kata
Hand Rolled Applicative User Validation Code Kata
 
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf2024 eCommerceDays Toulouse - Sylius 2.0.pdf
2024 eCommerceDays Toulouse - Sylius 2.0.pdf
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s EcosystemUI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
UI5con 2024 - Keynote: Latest News about UI5 and it’s Ecosystem
 
SMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API ServiceSMS API Integration in Saudi Arabia| Best SMS API Service
SMS API Integration in Saudi Arabia| Best SMS API Service
 

Android - Broadcast Receiver

  • 1. Android – BroadcastReceiver Yong Heui Cho @ Mokwon University Some of slides are referred to: [1] Everything of Android, slideshare.
  • 2. 2 Broadcast Receiver • An Intent-based publish- subscribe mechanism. • Great for listening system events such as SMS messages. □ Courtesy to Everything of Android, slideshare.
  • 3. 3 Uses of BR • A broadcast receiver is a component that does nothing but receive and react to broadcast announcements • Your app can – Receive and react to system services (example: battery low) – Receive and react to other apps broadcast announcements – Initiate broadcasts to other apps □ Courtesy to Everything of Android, slideshare.
  • 4. 4 Register of BR • To register Broadcast Receiver, you can – Dynamically register with registerReceiver (in code) – Using <register> tag in AndroidManifest.xml □ Courtesy to Everything of Android, slideshare.
  • 5. 5 Send of Broadcast • Broadcast is sent using Intent and sendBroadcast or sendOrderedBroadcast methods • Example: – Intent intent = new Intent(“com.enlume.MSG_PRO"); sendBroadcast(intent); □ Courtesy to Everything of Android, slideshare.
  • 6. 6 Normal vs. Ordered • Normal Broadcasts – Sent with sendBroadcast. All broadcasts are run in undefined order, often at the same time. • Ordered Broadcasts – Sent with sendOrderedBroadcast. Each receiver executes in turn. Possible to propagate a result to next receiver. Order can be controlled using android:priority tag. □ Courtesy to Everything of Android, slideshare.
  • 7. 7 BR Lifecycle • Broadcast Receiver object is valid only for the duration of the onReceive(Context, Intent) method. – You cannot do anything asynchronous in here! – Except you can start a service, which can start a thread. □ Courtesy to Everything of Android, slideshare.
  • 8. 8 Event Listener • Interface to process specific events
  • 9. 9 BR vs. Listener type BroadcastReceiver Listener goal class for Intents class or interface for Intents & others message mostly global messages mostly specific messages period discontinuous reception frequent (or continuous) reception construction static (manifest) or dynamic dynamic only