SlideShare une entreprise Scribd logo
1  sur  9
Activity 
An Activity is an application component that provides a 
screen with which users can interact in order to do 
something, such as dial the phone, take a photo, send 
an email, or view a map. 
Each activity is given a window in which to draw 
its user interface. 
An application usually consists of multiple 
activities that are loosely bound to each other.
Activity 
Each time a new activity starts, the 
previous activity is stopped, but the 
system preserves the activity in a stack . 
When a new activity starts, it is pushed 
onto the back stack and takes user 
focus.
Go Phish! 4 
Android 
Activity - >
Activity life 
cycle - >
Method Description Next 
onCreate() Called when the activity is first created. onStart() 
onRestart() Called after your activity has been stopped, just prior to 
it being started again. 
Always followed by onStart() 
onStart() 
onStart() Called when the activity is becoming visible to the user. 
Followed by onResume() if the activity comes to the 
foreground, or onStop() if it becomes hidden. 
onResume()or 
onStop() 
onResume() Called when the activity will start interacting with the 
user. 
Always followed by onPause(). 
onPause() 
onPause() Called when the system is about to start resuming a 
previous activity. 
onResume() 
or 
onStop() 
onStop() Called when the activity is no longer visible to the user. 
Followed by either onRestart() if this activity is coming 
back to interact with the user, or onDestroy() if this 
activity is going away. 
onRestart() 
or 
onDestroy() 
onDestroy() The final call you receive before your activity is 
Go Phish! 6 
destroyed. 
nothing
Example: 
When the Activity first time loads the events are called as below: 
onCreate() 
onStart() 
onResume() 
When you click on Phone button the Activity goes to the background and the below events 
are called: 
onPause() 
onStop() 
Exit the phone dialer and the below events will be called: 
onRestart() 
onStart() 
onResume() 
When you click the back button OR try to finish() the activity the events are called as below: 
onPause() 
onStop() 
onDestroy()
Activity Stack 
• Activities in the system are managed as an activity stack. An activity has essentially four states: 
If an activity in the foreground of 
the screen (at the top of the stack), 
it is active or running. 
If an activity is completely obscured 
by another activity, it is stopped. 
If an activity has lost focus, it 
is paused. 
If an activity is paused or stopped, 
the system can drop the activity 
from memory by either asking it to 
finish, or simply killing its process.
Android activity lifecycle

Contenu connexe

Tendances (20)

Android User Interface
Android User InterfaceAndroid User Interface
Android User Interface
 
android activity
android activityandroid activity
android activity
 
Android Components
Android ComponentsAndroid Components
Android Components
 
Notification android
Notification androidNotification android
Notification android
 
android layouts
android layoutsandroid layouts
android layouts
 
Applets in java
Applets in javaApplets in java
Applets in java
 
Android notification
Android notificationAndroid notification
Android notification
 
SQLITE Android
SQLITE AndroidSQLITE Android
SQLITE Android
 
Android life cycle
Android life cycleAndroid life cycle
Android life cycle
 
graphics programming in java
graphics programming in javagraphics programming in java
graphics programming in java
 
Location-Based Services on Android
Location-Based Services on AndroidLocation-Based Services on Android
Location-Based Services on Android
 
Android activities & views
Android activities & viewsAndroid activities & views
Android activities & views
 
Event handling
Event handlingEvent handling
Event handling
 
Android - Android Intent Types
Android - Android Intent TypesAndroid - Android Intent Types
Android - Android Intent Types
 
Java swing
Java swingJava swing
Java swing
 
Event handling
Event handlingEvent handling
Event handling
 
Android share preferences
Android share preferencesAndroid share preferences
Android share preferences
 
Event Handling in java
Event Handling in javaEvent Handling in java
Event Handling in java
 
Android studio installation
Android studio installationAndroid studio installation
Android studio installation
 
Android application structure
Android application structureAndroid application structure
Android application structure
 

En vedette

Android Life Cycle
Android Life CycleAndroid Life Cycle
Android Life Cyclemssaman
 
Android lifecycle
Android lifecycleAndroid lifecycle
Android lifecycleKumar
 
Events and Listeners in Android
Events and Listeners in AndroidEvents and Listeners in Android
Events and Listeners in Androidma-polimi
 
Android Jam - Activity Lifecycle & Databases - Udacity Lesson 4a
Android Jam - Activity Lifecycle & Databases - Udacity Lesson 4aAndroid Jam - Activity Lifecycle & Databases - Udacity Lesson 4a
Android Jam - Activity Lifecycle & Databases - Udacity Lesson 4aPaul Blundell
 
ListView and Custom ListView on Android Development [Thai]
ListView and Custom ListView on Android Development [Thai]ListView and Custom ListView on Android Development [Thai]
ListView and Custom ListView on Android Development [Thai]Somkiat Khitwongwattana
 
Android | Android Activity Launch Modes and Tasks | Gonçalo Silva
Android | Android Activity Launch Modes and Tasks | Gonçalo SilvaAndroid | Android Activity Launch Modes and Tasks | Gonçalo Silva
Android | Android Activity Launch Modes and Tasks | Gonçalo SilvaJAX London
 
Getting Started With Material Design
Getting Started With Material DesignGetting Started With Material Design
Getting Started With Material DesignYasin Yildirim
 
Android custom listview
Android custom listviewAndroid custom listview
Android custom listviewparmistech
 
Post-PC: Geolocation & Maps in the Android Ecosystem
Post-PC: Geolocation & Maps in the Android EcosystemPost-PC: Geolocation & Maps in the Android Ecosystem
Post-PC: Geolocation & Maps in the Android EcosystemMichael Genkin
 
Multimedia on android
Multimedia on androidMultimedia on android
Multimedia on androidRamesh Prasad
 
Persistence in Android
Persistence in AndroidPersistence in Android
Persistence in Androidma-polimi
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldChristian Melchior
 
Open Ldap Integration and Configuration with Lifray 6.2
Open Ldap Integration and Configuration with Lifray 6.2Open Ldap Integration and Configuration with Lifray 6.2
Open Ldap Integration and Configuration with Lifray 6.2Vinaykumar Hebballi
 

En vedette (20)

Google android Activity lifecycle
Google android Activity lifecycle Google android Activity lifecycle
Google android Activity lifecycle
 
Android Life Cycle
Android Life CycleAndroid Life Cycle
Android Life Cycle
 
Android lifecycle
Android lifecycleAndroid lifecycle
Android lifecycle
 
Events and Listeners in Android
Events and Listeners in AndroidEvents and Listeners in Android
Events and Listeners in Android
 
The android activity lifecycle
The android activity lifecycleThe android activity lifecycle
The android activity lifecycle
 
Android Jam - Activity Lifecycle & Databases - Udacity Lesson 4a
Android Jam - Activity Lifecycle & Databases - Udacity Lesson 4aAndroid Jam - Activity Lifecycle & Databases - Udacity Lesson 4a
Android Jam - Activity Lifecycle & Databases - Udacity Lesson 4a
 
ListView and Custom ListView on Android Development [Thai]
ListView and Custom ListView on Android Development [Thai]ListView and Custom ListView on Android Development [Thai]
ListView and Custom ListView on Android Development [Thai]
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Android | Android Activity Launch Modes and Tasks | Gonçalo Silva
Android | Android Activity Launch Modes and Tasks | Gonçalo SilvaAndroid | Android Activity Launch Modes and Tasks | Gonçalo Silva
Android | Android Activity Launch Modes and Tasks | Gonçalo Silva
 
Android ppt
Android pptAndroid ppt
Android ppt
 
Getting Started With Material Design
Getting Started With Material DesignGetting Started With Material Design
Getting Started With Material Design
 
Android custom listview
Android custom listviewAndroid custom listview
Android custom listview
 
Android Data Persistence
Android Data PersistenceAndroid Data Persistence
Android Data Persistence
 
Post-PC: Geolocation & Maps in the Android Ecosystem
Post-PC: Geolocation & Maps in the Android EcosystemPost-PC: Geolocation & Maps in the Android Ecosystem
Post-PC: Geolocation & Maps in the Android Ecosystem
 
Logcatの話
Logcatの話Logcatの話
Logcatの話
 
Multimedia on android
Multimedia on androidMultimedia on android
Multimedia on android
 
Persistence in Android
Persistence in AndroidPersistence in Android
Persistence in Android
 
Android Custom view
Android Custom view Android Custom view
Android Custom view
 
Painless Persistence in a Disconnected World
Painless Persistence in a Disconnected WorldPainless Persistence in a Disconnected World
Painless Persistence in a Disconnected World
 
Open Ldap Integration and Configuration with Lifray 6.2
Open Ldap Integration and Configuration with Lifray 6.2Open Ldap Integration and Configuration with Lifray 6.2
Open Ldap Integration and Configuration with Lifray 6.2
 

Similaire à Android activity lifecycle

android_mod_3.useful for bca students for their last sem
android_mod_3.useful for bca students for their last semandroid_mod_3.useful for bca students for their last sem
android_mod_3.useful for bca students for their last semaswinbiju1652
 
Android activity
Android activityAndroid activity
Android activityMohNage7
 
Mad textbook 63-116
Mad textbook 63-116Mad textbook 63-116
Mad textbook 63-116PrathishGM
 
Android development Training Programme Day 2
Android development Training Programme Day 2Android development Training Programme Day 2
Android development Training Programme Day 2DHIRAJ PRAVIN
 
Day 4: Activity lifecycle
Day 4: Activity lifecycleDay 4: Activity lifecycle
Day 4: Activity lifecycleAhsanul Karim
 
02 programmation mobile - android - (activity, view, fragment)
02 programmation mobile - android - (activity, view, fragment)02 programmation mobile - android - (activity, view, fragment)
02 programmation mobile - android - (activity, view, fragment)TECOS
 
Anatomy of android application
Anatomy of android applicationAnatomy of android application
Anatomy of android applicationNikunj Dhameliya
 
B2. activity and intent
B2. activity and intentB2. activity and intent
B2. activity and intentPERKYTORIALS
 
Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Gabor Varadi
 
Android Activities.pdf
Android Activities.pdfAndroid Activities.pdf
Android Activities.pdfssusere71a07
 
Voices That Matter: JavaScript Events
Voices That Matter: JavaScript EventsVoices That Matter: JavaScript Events
Voices That Matter: JavaScript EventsPeter-Paul Koch
 

Similaire à Android activity lifecycle (20)

android_mod_3.useful for bca students for their last sem
android_mod_3.useful for bca students for their last semandroid_mod_3.useful for bca students for their last sem
android_mod_3.useful for bca students for their last sem
 
Activities
ActivitiesActivities
Activities
 
Android activity
Android activityAndroid activity
Android activity
 
Mad textbook 63-116
Mad textbook 63-116Mad textbook 63-116
Mad textbook 63-116
 
Android development Training Programme Day 2
Android development Training Programme Day 2Android development Training Programme Day 2
Android development Training Programme Day 2
 
Day 4: Activity lifecycle
Day 4: Activity lifecycleDay 4: Activity lifecycle
Day 4: Activity lifecycle
 
Android development session 2 - intent and activity
Android development   session 2 - intent and activityAndroid development   session 2 - intent and activity
Android development session 2 - intent and activity
 
02 programmation mobile - android - (activity, view, fragment)
02 programmation mobile - android - (activity, view, fragment)02 programmation mobile - android - (activity, view, fragment)
02 programmation mobile - android - (activity, view, fragment)
 
Anatomy of android application
Anatomy of android applicationAnatomy of android application
Anatomy of android application
 
The activity class
The activity classThe activity class
The activity class
 
The activity class
The activity classThe activity class
The activity class
 
Activity
ActivityActivity
Activity
 
Activity
ActivityActivity
Activity
 
Activity
ActivityActivity
Activity
 
Activity
ActivityActivity
Activity
 
B2. activity and intent
B2. activity and intentB2. activity and intent
B2. activity and intent
 
Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)Architecting Single Activity Applications (With or Without Fragments)
Architecting Single Activity Applications (With or Without Fragments)
 
Android
AndroidAndroid
Android
 
Android Activities.pdf
Android Activities.pdfAndroid Activities.pdf
Android Activities.pdf
 
Voices That Matter: JavaScript Events
Voices That Matter: JavaScript EventsVoices That Matter: JavaScript Events
Voices That Matter: JavaScript Events
 

Dernier

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataBabyAnnMotar
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...JojoEDelaCruz
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxJanEmmanBrigoli
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operationalssuser3e220a
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxruthvilladarez
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...Postal Advocate Inc.
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxAnupkumar Sharma
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSMae Pangan
 

Dernier (20)

Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
Measures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped dataMeasures of Position DECILES for ungrouped data
Measures of Position DECILES for ungrouped data
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
ENG 5 Q4 WEEk 1 DAY 1 Restate sentences heard in one’s own words. Use appropr...
 
Millenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptxMillenials and Fillennials (Ethical Challenge and Responses).pptx
Millenials and Fillennials (Ethical Challenge and Responses).pptx
 
Expanded definition: technical and operational
Expanded definition: technical and operationalExpanded definition: technical and operational
Expanded definition: technical and operational
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
TEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docxTEACHER REFLECTION FORM (NEW SET........).docx
TEACHER REFLECTION FORM (NEW SET........).docx
 
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
USPS® Forced Meter Migration - How to Know if Your Postage Meter Will Soon be...
 
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptxMULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
MULTIDISCIPLINRY NATURE OF THE ENVIRONMENTAL STUDIES.pptx
 
Textual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHSTextual Evidence in Reading and Writing of SHS
Textual Evidence in Reading and Writing of SHS
 

Android activity lifecycle

  • 1.
  • 2. Activity An Activity is an application component that provides a screen with which users can interact in order to do something, such as dial the phone, take a photo, send an email, or view a map. Each activity is given a window in which to draw its user interface. An application usually consists of multiple activities that are loosely bound to each other.
  • 3. Activity Each time a new activity starts, the previous activity is stopped, but the system preserves the activity in a stack . When a new activity starts, it is pushed onto the back stack and takes user focus.
  • 4. Go Phish! 4 Android Activity - >
  • 6. Method Description Next onCreate() Called when the activity is first created. onStart() onRestart() Called after your activity has been stopped, just prior to it being started again. Always followed by onStart() onStart() onStart() Called when the activity is becoming visible to the user. Followed by onResume() if the activity comes to the foreground, or onStop() if it becomes hidden. onResume()or onStop() onResume() Called when the activity will start interacting with the user. Always followed by onPause(). onPause() onPause() Called when the system is about to start resuming a previous activity. onResume() or onStop() onStop() Called when the activity is no longer visible to the user. Followed by either onRestart() if this activity is coming back to interact with the user, or onDestroy() if this activity is going away. onRestart() or onDestroy() onDestroy() The final call you receive before your activity is Go Phish! 6 destroyed. nothing
  • 7. Example: When the Activity first time loads the events are called as below: onCreate() onStart() onResume() When you click on Phone button the Activity goes to the background and the below events are called: onPause() onStop() Exit the phone dialer and the below events will be called: onRestart() onStart() onResume() When you click the back button OR try to finish() the activity the events are called as below: onPause() onStop() onDestroy()
  • 8. Activity Stack • Activities in the system are managed as an activity stack. An activity has essentially four states: If an activity in the foreground of the screen (at the top of the stack), it is active or running. If an activity is completely obscured by another activity, it is stopped. If an activity has lost focus, it is paused. If an activity is paused or stopped, the system can drop the activity from memory by either asking it to finish, or simply killing its process.