SlideShare a Scribd company logo
Android –
Message
Yong Heui Cho @ Mokwon University
Some of slides are referred to:
[1] Nitin Ramchandani, Android OS, slideshare.
2
Smart Device Structure
3. Basic Android OS
4. Android – Application
Framework
5. Android – Message
6. Android – BroadcastReceiver
3
Application
Application Structure
Activity
Context
OS
Resources
Service
lifecycle
4
Application Lifecycle
I. In Android, every application runs in their
own process.
II. Processes are started or stopped as needed
to run application components.
III. A process may be killed to reclaim resources.
□ Courtesy to Nitin Ramchandani, Android OS, slideshare.
5
Activity Lifecycle (I)
6
• onCreate(Bundle): This is called when the activity first
starts up.
•onStart( ): This indicates the activity is about to be
displayed to the user.
• onResume( ): This is called when your activity can start
interacting with the user. This is a good place to start
animations and music.
• onPause( ): This runs when the activity is about to go
into the background, usually because another activity has
been launched in front of it. This is where you should save
your program’s persistent state, such as a database record
being edited.
Activity Lifecycle (II)
□ Courtesy to Nitin Ramchandani, Android OS, slideshare.
7
• onStop( ): This is called when your activity is no longer
visible to the user and it won’t be needed for a while. If
memory is tight, onStop( ) may never be called (the system
may simply terminate your process).
• onRestart( ): If this method is called, it indicates your
activity is being redisplayed to the user from a stopped state.
• onDestroy( ): This is called right before your activity is
destroyed. If memory is tight, onDestroy( ) may never be
called (the system may simply terminate your process).
Activity Lifecycle (III)
□ Courtesy to Nitin Ramchandani, Android OS, slideshare.
8
•onSaveInstanceState(Bundle): Android will call this
method to allow the activity to save per-instance state,
such as a cursor position within a text field. Usually you
won’t need to override it because the default
implementation saves the state for all your user interface
controls automatically.
• onRestoreInstanceState(Bundle): This is called when
the activity is being reinitialized from a state previously
saved by the onSaveInstanceState( ) method. The default
implementation restores the state of your user interface.
Save & Restore
□ Courtesy to Nitin Ramchandani, Android OS, slideshare.
9
Lifecycle Comparison
Run Terminate
onCreate() onDestroy()
onStart() onStop()
onResume() onPause()
onRestart() -
onRestoreInstanceState() onSaveInstanceState()
10
Summary of Lifecycle
11
Android vs. Windows
type Android Windows
CPU optimal fast
battery small power supply
memory
mobile DRAM
small
DRAM
large
message handler
message (Message)
or action (String)
message (int)
termination app lifecycle permanent
function call call & proceed
call & wait
or call & proceed
12
MVC Components
13
Android Msg Handler
• Message: containing a description and arbitrary data
object
• Runnable: a command that can be executed
• Handler: allows you to send and process Message and
Runnable
• Looper: used to run a message loop for a thread
14
Concept of Multithread
15
Android Rules
• Do not block the UI thread (or main
thread).
• Do not access the Android UI toolkit
from outside the UI thread.
16
Event Listener
• Interface to process specific events

More Related Content

Viewers also liked

Android - Phone Calls
Android - Phone CallsAndroid - Phone Calls
Android - Phone Calls
Yong Heui Cho
 
스마트디바이스구조(강의계획서)2017-2
스마트디바이스구조(강의계획서)2017-2스마트디바이스구조(강의계획서)2017-2
스마트디바이스구조(강의계획서)2017-2
Yong Heui Cho
 
Android - Broadcast Receiver
Android - Broadcast ReceiverAndroid - Broadcast Receiver
Android - Broadcast Receiver
Yong Heui Cho
 
ICT+UD IoT App 융합작품 개발문서(스마트디바이스구조)
ICT+UD IoT App 융합작품 개발문서(스마트디바이스구조)ICT+UD IoT App 융합작품 개발문서(스마트디바이스구조)
ICT+UD IoT App 융합작품 개발문서(스마트디바이스구조)
Yong Heui Cho
 
TestECD2017-1(answer)
TestECD2017-1(answer)TestECD2017-1(answer)
TestECD2017-1(answer)
Yong Heui Cho
 
TestSDS2016-2(Answer)
TestSDS2016-2(Answer)TestSDS2016-2(Answer)
TestSDS2016-2(Answer)
Yong Heui Cho
 
Android - Application Framework
Android - Application FrameworkAndroid - Application Framework
Android - Application Framework
Yong Heui Cho
 
Introduction to IoT
Introduction to IoTIntroduction to IoT
Introduction to IoT
Yong Heui Cho
 
ICT+UD 융합작품 개발문서(전자회로설계)
ICT+UD 융합작품 개발문서(전자회로설계)ICT+UD 융합작품 개발문서(전자회로설계)
ICT+UD 융합작품 개발문서(전자회로설계)
Yong Heui Cho
 
Introduction to RTOS
Introduction to RTOSIntroduction to RTOS
Introduction to RTOS
Yong Heui Cho
 
TestSDIC2017-2(answer)
TestSDIC2017-2(answer)TestSDIC2017-2(answer)
TestSDIC2017-2(answer)
Yong Heui Cho
 
TestSDIC2017-1(answer)
TestSDIC2017-1(answer)TestSDIC2017-1(answer)
TestSDIC2017-1(answer)
Yong Heui Cho
 
TestSDS2016-1(Answer)
TestSDS2016-1(Answer)TestSDS2016-1(Answer)
TestSDS2016-1(Answer)
Yong Heui Cho
 
Introduction to Smart Devices
Introduction to Smart DevicesIntroduction to Smart Devices
Introduction to Smart Devices
Yong Heui Cho
 
Smart Device RF & Antennas
Smart Device RF & AntennasSmart Device RF & Antennas
Smart Device RF & Antennas
Yong Heui Cho
 

Viewers also liked (15)

Android - Phone Calls
Android - Phone CallsAndroid - Phone Calls
Android - Phone Calls
 
스마트디바이스구조(강의계획서)2017-2
스마트디바이스구조(강의계획서)2017-2스마트디바이스구조(강의계획서)2017-2
스마트디바이스구조(강의계획서)2017-2
 
Android - Broadcast Receiver
Android - Broadcast ReceiverAndroid - Broadcast Receiver
Android - Broadcast Receiver
 
ICT+UD IoT App 융합작품 개발문서(스마트디바이스구조)
ICT+UD IoT App 융합작품 개발문서(스마트디바이스구조)ICT+UD IoT App 융합작품 개발문서(스마트디바이스구조)
ICT+UD IoT App 융합작품 개발문서(스마트디바이스구조)
 
TestECD2017-1(answer)
TestECD2017-1(answer)TestECD2017-1(answer)
TestECD2017-1(answer)
 
TestSDS2016-2(Answer)
TestSDS2016-2(Answer)TestSDS2016-2(Answer)
TestSDS2016-2(Answer)
 
Android - Application Framework
Android - Application FrameworkAndroid - Application Framework
Android - Application Framework
 
Introduction to IoT
Introduction to IoTIntroduction to IoT
Introduction to IoT
 
ICT+UD 융합작품 개발문서(전자회로설계)
ICT+UD 융합작품 개발문서(전자회로설계)ICT+UD 융합작품 개발문서(전자회로설계)
ICT+UD 융합작품 개발문서(전자회로설계)
 
Introduction to RTOS
Introduction to RTOSIntroduction to RTOS
Introduction to RTOS
 
TestSDIC2017-2(answer)
TestSDIC2017-2(answer)TestSDIC2017-2(answer)
TestSDIC2017-2(answer)
 
TestSDIC2017-1(answer)
TestSDIC2017-1(answer)TestSDIC2017-1(answer)
TestSDIC2017-1(answer)
 
TestSDS2016-1(Answer)
TestSDS2016-1(Answer)TestSDS2016-1(Answer)
TestSDS2016-1(Answer)
 
Introduction to Smart Devices
Introduction to Smart DevicesIntroduction to Smart Devices
Introduction to Smart Devices
 
Smart Device RF & Antennas
Smart Device RF & AntennasSmart Device RF & Antennas
Smart Device RF & Antennas
 

Similar to Android - Message

Android - Message
Android - MessageAndroid - Message
Android - Message
Yong Heui Cho
 
Anatomy of android application
Anatomy of android applicationAnatomy of android application
Anatomy of android application
Nikunj Dhameliya
 
Presentation on Android application life cycle and saved instancestate
Presentation on Android application life cycle and saved instancestatePresentation on Android application life cycle and saved instancestate
Presentation on Android application life cycle and saved instancestate
Osahon Gino Ediagbonya
 
Lecture #4 activities & fragments
Lecture #4  activities & fragmentsLecture #4  activities & fragments
Lecture #4 activities & fragments
Vitali Pekelis
 
Android lifecycle
Android lifecycleAndroid lifecycle
Android lifecycle
Kumar
 
Dori waldman android _course
Dori waldman android _courseDori waldman android _course
Dori waldman android _course
Dori Waldman
 
Dori waldman android _course_2
Dori waldman android _course_2Dori waldman android _course_2
Dori waldman android _course_2
Dori Waldman
 
Process Management in Android
Process Management in AndroidProcess Management in Android
Process Management in Android
Shrey Verma
 
Android development Training Programme Day 2
Android development Training Programme Day 2Android development Training Programme Day 2
Android development Training Programme Day 2DHIRAJ PRAVIN
 
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
MugiiiReee
 
Android life cycle
Android life cycleAndroid life cycle
Android life cycle瑋琮 林
 
04 activities and activity life cycle
04 activities and activity life cycle04 activities and activity life cycle
04 activities and activity life cycle
Sokngim Sa
 
Android Activities.pdf
Android Activities.pdfAndroid Activities.pdf
Android Activities.pdf
ssusere71a07
 
Activities
ActivitiesActivities
Activities
Sourabh Sahu
 
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.pptUnit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
dineshkumar periyasamy
 
B2. activity and intent
B2. activity and intentB2. activity and intent
B2. activity and intent
PERKYTORIALS
 
MD-IV-CH-ppt.ppt
MD-IV-CH-ppt.pptMD-IV-CH-ppt.ppt
MD-IV-CH-ppt.ppt
bharatt7
 
Android activity
Android activityAndroid activity
Android activityKrazy Koder
 
Android activity
Android activityAndroid activity
Android activityKrazy Koder
 

Similar to Android - Message (20)

Android - Message
Android - MessageAndroid - Message
Android - Message
 
Anatomy of android application
Anatomy of android applicationAnatomy of android application
Anatomy of android application
 
Presentation on Android application life cycle and saved instancestate
Presentation on Android application life cycle and saved instancestatePresentation on Android application life cycle and saved instancestate
Presentation on Android application life cycle and saved instancestate
 
Android
AndroidAndroid
Android
 
Lecture #4 activities & fragments
Lecture #4  activities & fragmentsLecture #4  activities & fragments
Lecture #4 activities & fragments
 
Android lifecycle
Android lifecycleAndroid lifecycle
Android lifecycle
 
Dori waldman android _course
Dori waldman android _courseDori waldman android _course
Dori waldman android _course
 
Dori waldman android _course_2
Dori waldman android _course_2Dori waldman android _course_2
Dori waldman android _course_2
 
Process Management in Android
Process Management in AndroidProcess Management in Android
Process Management in Android
 
Android development Training Programme Day 2
Android development Training Programme Day 2Android development Training Programme Day 2
Android development Training Programme Day 2
 
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx11.11.2020 - Unit 5-3  ACTIVITY, MENU AND SQLITE DATABASE.pptx
11.11.2020 - Unit 5-3 ACTIVITY, MENU AND SQLITE DATABASE.pptx
 
Android life cycle
Android life cycleAndroid life cycle
Android life cycle
 
04 activities and activity life cycle
04 activities and activity life cycle04 activities and activity life cycle
04 activities and activity life cycle
 
Android Activities.pdf
Android Activities.pdfAndroid Activities.pdf
Android Activities.pdf
 
Activities
ActivitiesActivities
Activities
 
Unit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.pptUnit I- ANDROID OVERVIEW.ppt
Unit I- ANDROID OVERVIEW.ppt
 
B2. activity and intent
B2. activity and intentB2. activity and intent
B2. activity and intent
 
MD-IV-CH-ppt.ppt
MD-IV-CH-ppt.pptMD-IV-CH-ppt.ppt
MD-IV-CH-ppt.ppt
 
Android activity
Android activityAndroid activity
Android activity
 
Android activity
Android activityAndroid activity
Android activity
 

More from Yong Heui Cho

Android - Sensor Manager
Android - Sensor ManagerAndroid - Sensor Manager
Android - Sensor Manager
Yong Heui Cho
 
Android - Broadcast Receiver
Android - Broadcast ReceiverAndroid - Broadcast Receiver
Android - Broadcast Receiver
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 - Broadcast Receiver
Android - Broadcast ReceiverAndroid - Broadcast Receiver
Android - Broadcast Receiver
 
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

The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
James Anderson
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
Globus
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
sonjaschweigert1
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 

Recently uploaded (20)

The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Enhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZEnhancing Performance with Globus and the Science DMZ
Enhancing Performance with Globus and the Science DMZ
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...A tale of scale & speed: How the US Navy is enabling software delivery from l...
A tale of scale & speed: How the US Navy is enabling software delivery from l...
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 

Android - Message

  • 1. Android – Message Yong Heui Cho @ Mokwon University Some of slides are referred to: [1] Nitin Ramchandani, Android OS, slideshare.
  • 2. 2 Smart Device Structure 3. Basic Android OS 4. Android – Application Framework 5. Android – Message 6. Android – BroadcastReceiver
  • 4. 4 Application Lifecycle I. In Android, every application runs in their own process. II. Processes are started or stopped as needed to run application components. III. A process may be killed to reclaim resources. □ Courtesy to Nitin Ramchandani, Android OS, slideshare.
  • 6. 6 • onCreate(Bundle): This is called when the activity first starts up. •onStart( ): This indicates the activity is about to be displayed to the user. • onResume( ): This is called when your activity can start interacting with the user. This is a good place to start animations and music. • onPause( ): This runs when the activity is about to go into the background, usually because another activity has been launched in front of it. This is where you should save your program’s persistent state, such as a database record being edited. Activity Lifecycle (II) □ Courtesy to Nitin Ramchandani, Android OS, slideshare.
  • 7. 7 • onStop( ): This is called when your activity is no longer visible to the user and it won’t be needed for a while. If memory is tight, onStop( ) may never be called (the system may simply terminate your process). • onRestart( ): If this method is called, it indicates your activity is being redisplayed to the user from a stopped state. • onDestroy( ): This is called right before your activity is destroyed. If memory is tight, onDestroy( ) may never be called (the system may simply terminate your process). Activity Lifecycle (III) □ Courtesy to Nitin Ramchandani, Android OS, slideshare.
  • 8. 8 •onSaveInstanceState(Bundle): Android will call this method to allow the activity to save per-instance state, such as a cursor position within a text field. Usually you won’t need to override it because the default implementation saves the state for all your user interface controls automatically. • onRestoreInstanceState(Bundle): This is called when the activity is being reinitialized from a state previously saved by the onSaveInstanceState( ) method. The default implementation restores the state of your user interface. Save & Restore □ Courtesy to Nitin Ramchandani, Android OS, slideshare.
  • 9. 9 Lifecycle Comparison Run Terminate onCreate() onDestroy() onStart() onStop() onResume() onPause() onRestart() - onRestoreInstanceState() onSaveInstanceState()
  • 11. 11 Android vs. Windows type Android Windows CPU optimal fast battery small power supply memory mobile DRAM small DRAM large message handler message (Message) or action (String) message (int) termination app lifecycle permanent function call call & proceed call & wait or call & proceed
  • 13. 13 Android Msg Handler • Message: containing a description and arbitrary data object • Runnable: a command that can be executed • Handler: allows you to send and process Message and Runnable • Looper: used to run a message loop for a thread
  • 15. 15 Android Rules • Do not block the UI thread (or main thread). • Do not access the Android UI toolkit from outside the UI thread.
  • 16. 16 Event Listener • Interface to process specific events