SlideShare a Scribd company logo
1 of 19
APPLICATION LIFECYCLE
Application lifecycles

 Applications and processes may transition
  between several states
   active
   paused
   stopped
   inactive
   suspended
 Callback methods allow applications to
  prepare for and respond to transitions
Android lifecycle methods

 Lifecycle state transitions trigger event
  callback methods
 Callback events differ based on type of
  component
 Callback methods take place in foreground
  and should be brief
Android Activity


                           Activity.                       Activity.
            Activity.                    Activity.                      Activity.   Activity.
                          onRestore                        onSave
            onStart                     onResume                        onPause     onStop
                        InstanceState                   InstanceState
Activity.                                                                                        Activity.
onCreate                                                                                        onDestroy




                                                          Activity.
                                                         onRestart




                                                     Active lifetime

                                                     Visible lifetime

                                                      Full lifetime
                                                                                        Application is
                                                                                        killable
Activity callback methods

 Implementation of lifecycle method should
  always first call superclass

         protected void onPause() {
             super.onPause();
             . . .
         }
Activity transition
     Activity A   Activity B

     ActivityA.
     onPause
                  ActivityB.
                  onCreate

                  ActivityB.
                   onStart

                  ActivityB.
                  onResume
     ActivityA.
      onStop
Android Service

Service.       Service.                               Service.
onCreate   onStartCommand                            onDestroy




                  Service.                Service.
                  onBind                 onUnbind



                              Service.
                             onRebind
Service binding methods
        Activity           Service


      bindService()

                           .onBind()
   ServiceConnection.
   onServiceConnected



     unbindService()

                          .onUnbind()
    ServiceConnection.
  onServiceDisconnected
Android BroadcastReceiver


                BroadcastReceiver.
                    onReceive




 Only active while handling onReceive()
  method
Android ContentProvider

                  ContentProvider.
                     onCreate



 Only active while handling methods
  supporting ContentResolver
     query()
     insert()
     update()
     delete()
     getType()
Processes and lifecycles

 Old processes removed when memory runs
  low
 Selection base on importance hierarchy
  1.   Foreground process
  2.   Visible process
  3.   Service process
  4.   Background process
  5.   Empty process
iOS Application lifecycle

 UIApplication notified of state transition
  events
   Handled by application delegate
     application:didFinishLaunchingWithOptions:
     applicationDidBecomeActive:
     applicationWillResignActive:
     applicationDidEnterBackground:
     applicationWillEnterForeground:
     applicationWillTerminate:
Pre – iOS 4

      application:didFinishLaunchingWithOptions:



             applicationDidBecomeActive:



                        Active



              applicationWillTerminate:
iOS Application launch
iOS Transition to background
iOS Return to foreground
iOS Interruption handling
          UIKit                      Delegate


         Active



 Phone, SMS, or Calendar
                            applicationWillResignActive:
   notification arrives


         Ignore     Yes     applicationDidBecomeActive:
            ?
        No
  Application moves to
                           applicationDidEnterBackground:
      background
iOS 4 Application lifecycle
      application:didFinishLaunchingWithOptions:



             applicationDidBecomeActive:


  Ignore
interrupt               Active              applicationWillEnterForeground:



             applicationWillResignActive:



            applicationDidEnterBackground:
                                                         Suspended


               applicationWillTerminate:
Reminder

 Proposal due Wednesday

More Related Content

What's hot

Layout with Stack View, Table View, and Collection View
Layout with Stack View, Table View, and Collection ViewLayout with Stack View, Table View, and Collection View
Layout with Stack View, Table View, and Collection ViewMake School
 
Peeking inside the engine of ZIO SQL.pdf
Peeking inside the engine of ZIO SQL.pdfPeeking inside the engine of ZIO SQL.pdf
Peeking inside the engine of ZIO SQL.pdfJaroslavRegec1
 
iOS Coding Best Practices
iOS Coding Best PracticesiOS Coding Best Practices
iOS Coding Best PracticesJean-Luc David
 
Testing with JUnit 5 and Spring
Testing with JUnit 5 and SpringTesting with JUnit 5 and Spring
Testing with JUnit 5 and SpringVMware Tanzu
 
Introduction to iOS Apps Development
Introduction to iOS Apps DevelopmentIntroduction to iOS Apps Development
Introduction to iOS Apps DevelopmentProf. Erwin Globio
 
SwiftUI and Combine All the Things
SwiftUI and Combine All the ThingsSwiftUI and Combine All the Things
SwiftUI and Combine All the ThingsScott Gardner
 
JSF Request Processing Lifecycle
JSF Request Processing LifecycleJSF Request Processing Lifecycle
JSF Request Processing LifecycleMilap Bhanderi
 
Android gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir SinghAndroid gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir SinghParamvir Singh
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testingvodQA
 
Managing Activity Backstack
Managing Activity BackstackManaging Activity Backstack
Managing Activity Backstackrajdeep
 
스프링캠프 2016 발표 - Deep dive into spring boot autoconfiguration
스프링캠프 2016 발표 - Deep dive into spring boot autoconfiguration스프링캠프 2016 발표 - Deep dive into spring boot autoconfiguration
스프링캠프 2016 발표 - Deep dive into spring boot autoconfiguration수홍 이
 
Jetpack Compose beginner.pdf
Jetpack Compose beginner.pdfJetpack Compose beginner.pdf
Jetpack Compose beginner.pdfAayushmaAgrawal
 
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...BeMyApp
 
Shared preferences
Shared preferencesShared preferences
Shared preferencesSourabh Sahu
 

What's hot (20)

Workshop Swift
Workshop Swift Workshop Swift
Workshop Swift
 
Fury - Docker Meetup
Fury - Docker MeetupFury - Docker Meetup
Fury - Docker Meetup
 
Layout with Stack View, Table View, and Collection View
Layout with Stack View, Table View, and Collection ViewLayout with Stack View, Table View, and Collection View
Layout with Stack View, Table View, and Collection View
 
Android Data Storagefinal
Android Data StoragefinalAndroid Data Storagefinal
Android Data Storagefinal
 
Peeking inside the engine of ZIO SQL.pdf
Peeking inside the engine of ZIO SQL.pdfPeeking inside the engine of ZIO SQL.pdf
Peeking inside the engine of ZIO SQL.pdf
 
iOS Coding Best Practices
iOS Coding Best PracticesiOS Coding Best Practices
iOS Coding Best Practices
 
Testing with JUnit 5 and Spring
Testing with JUnit 5 and SpringTesting with JUnit 5 and Spring
Testing with JUnit 5 and Spring
 
Introduction to iOS Apps Development
Introduction to iOS Apps DevelopmentIntroduction to iOS Apps Development
Introduction to iOS Apps Development
 
SwiftUI and Combine All the Things
SwiftUI and Combine All the ThingsSwiftUI and Combine All the Things
SwiftUI and Combine All the Things
 
JSF Request Processing Lifecycle
JSF Request Processing LifecycleJSF Request Processing Lifecycle
JSF Request Processing Lifecycle
 
Android gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir SinghAndroid gps, location services, camera and sensors - Paramvir Singh
Android gps, location services, camera and sensors - Paramvir Singh
 
Javascript Design Patterns
Javascript Design PatternsJavascript Design Patterns
Javascript Design Patterns
 
Mobile application testing
Mobile application testingMobile application testing
Mobile application testing
 
Managing Activity Backstack
Managing Activity BackstackManaging Activity Backstack
Managing Activity Backstack
 
Introduction to android testing
Introduction to android testingIntroduction to android testing
Introduction to android testing
 
스프링캠프 2016 발표 - Deep dive into spring boot autoconfiguration
스프링캠프 2016 발표 - Deep dive into spring boot autoconfiguration스프링캠프 2016 발표 - Deep dive into spring boot autoconfiguration
스프링캠프 2016 발표 - Deep dive into spring boot autoconfiguration
 
Jetpack Compose beginner.pdf
Jetpack Compose beginner.pdfJetpack Compose beginner.pdf
Jetpack Compose beginner.pdf
 
Life Cycle hooks in VueJs
Life Cycle hooks in VueJsLife Cycle hooks in VueJs
Life Cycle hooks in VueJs
 
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
[Android Codefest] Using the Second-Screen API & Intel® Wireless Display From...
 
Shared preferences
Shared preferencesShared preferences
Shared preferences
 

Viewers also liked

Android Application Development at JFokus 2011
Android Application Development at JFokus 2011Android Application Development at JFokus 2011
Android Application Development at JFokus 2011Anders Göransson
 
Nokia product life cycle
Nokia product life cycleNokia product life cycle
Nokia product life cycleTasheen Sheikh
 
1. maggi the-product-life-cycle
1. maggi the-product-life-cycle1. maggi the-product-life-cycle
1. maggi the-product-life-cycleSwati Sharma
 
Product life cycle & marketing strategies
Product life cycle & marketing strategiesProduct life cycle & marketing strategies
Product life cycle & marketing strategiesAmar Ingale
 
Product life cycle of nokia mobiles
Product life cycle of nokia mobilesProduct life cycle of nokia mobiles
Product life cycle of nokia mobilesTanmoy Roy
 
Product Life Cycle Management
Product Life Cycle ManagementProduct Life Cycle Management
Product Life Cycle ManagementAnand Subramaniam
 
Product life cycle & marketing strategy
Product life cycle & marketing strategyProduct life cycle & marketing strategy
Product life cycle & marketing strategyHitesh Sunny
 

Viewers also liked (10)

Android Application Development at JFokus 2011
Android Application Development at JFokus 2011Android Application Development at JFokus 2011
Android Application Development at JFokus 2011
 
Perception Ppt New
Perception Ppt NewPerception Ppt New
Perception Ppt New
 
Nokia product life cycle
Nokia product life cycleNokia product life cycle
Nokia product life cycle
 
1. maggi the-product-life-cycle
1. maggi the-product-life-cycle1. maggi the-product-life-cycle
1. maggi the-product-life-cycle
 
Product life cycle & marketing strategies
Product life cycle & marketing strategiesProduct life cycle & marketing strategies
Product life cycle & marketing strategies
 
Product life cycle
Product life cycleProduct life cycle
Product life cycle
 
Product life cycle of nokia mobiles
Product life cycle of nokia mobilesProduct life cycle of nokia mobiles
Product life cycle of nokia mobiles
 
Product Life Cycle Management
Product Life Cycle ManagementProduct Life Cycle Management
Product Life Cycle Management
 
Product life cycle & marketing strategy
Product life cycle & marketing strategyProduct life cycle & marketing strategy
Product life cycle & marketing strategy
 
Product life cycle
Product life cycleProduct life cycle
Product life cycle
 

Similar to iOS Application Lifecycle

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
 
App anatomy and life cycle
App anatomy and life cycleApp anatomy and life cycle
App anatomy and life cycleSV.CO
 
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.pptxMugiiiReee
 
Introduction to Handoff
Introduction to HandoffIntroduction to Handoff
Introduction to HandoffHarit Kothari
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1Hussain Behestee
 
Skinning Android for Embedded Applications
Skinning Android for Embedded ApplicationsSkinning Android for Embedded Applications
Skinning Android for Embedded ApplicationsVIA Embedded
 
Android Component.pptx
Android Component.pptxAndroid Component.pptx
Android Component.pptxQwerty140857
 
Android Training (Services)
Android Training (Services)Android Training (Services)
Android Training (Services)Khaled Anaqwa
 
Mad textbook 63-116
Mad textbook 63-116Mad textbook 63-116
Mad textbook 63-116PrathishGM
 
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 instancestateOsahon Gino Ediagbonya
 
Android development Training Programme Day 2
Android development Training Programme Day 2Android development Training Programme Day 2
Android development Training Programme Day 2DHIRAJ PRAVIN
 
Delegateless Coordinators - take 2
Delegateless Coordinators - take 2Delegateless Coordinators - take 2
Delegateless Coordinators - take 2Tales Andrade
 
Advanced android app lifecycle + Patterns
Advanced android app lifecycle + PatternsAdvanced android app lifecycle + Patterns
Advanced android app lifecycle + Patternsbryan costanich
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developersMarko Gargenta
 
Hieu Xamarin iOS9, Android M 3-11-2015
Hieu Xamarin iOS9, Android M  3-11-2015Hieu Xamarin iOS9, Android M  3-11-2015
Hieu Xamarin iOS9, Android M 3-11-2015Nguyen Hieu
 

Similar to iOS Application Lifecycle (20)

Introduction toandroid
Introduction toandroidIntroduction toandroid
Introduction toandroid
 
Android101
Android101Android101
Android101
 
Introduction to android
Introduction to androidIntroduction to android
Introduction to android
 
Efficient Android Threading
Efficient Android ThreadingEfficient Android Threading
Efficient Android Threading
 
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)
 
App anatomy and life cycle
App anatomy and life cycleApp anatomy and life cycle
App anatomy and life cycle
 
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
 
Introduction to Handoff
Introduction to HandoffIntroduction to Handoff
Introduction to Handoff
 
iOS app dev Training - Session1
iOS app dev Training - Session1iOS app dev Training - Session1
iOS app dev Training - Session1
 
Skinning Android for Embedded Applications
Skinning Android for Embedded ApplicationsSkinning Android for Embedded Applications
Skinning Android for Embedded Applications
 
Android Component.pptx
Android Component.pptxAndroid Component.pptx
Android Component.pptx
 
Android
AndroidAndroid
Android
 
Android Training (Services)
Android Training (Services)Android Training (Services)
Android Training (Services)
 
Mad textbook 63-116
Mad textbook 63-116Mad textbook 63-116
Mad textbook 63-116
 
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 development Training Programme Day 2
Android development Training Programme Day 2Android development Training Programme Day 2
Android development Training Programme Day 2
 
Delegateless Coordinators - take 2
Delegateless Coordinators - take 2Delegateless Coordinators - take 2
Delegateless Coordinators - take 2
 
Advanced android app lifecycle + Patterns
Advanced android app lifecycle + PatternsAdvanced android app lifecycle + Patterns
Advanced android app lifecycle + Patterns
 
Marakana android-java developers
Marakana android-java developersMarakana android-java developers
Marakana android-java developers
 
Hieu Xamarin iOS9, Android M 3-11-2015
Hieu Xamarin iOS9, Android M  3-11-2015Hieu Xamarin iOS9, Android M  3-11-2015
Hieu Xamarin iOS9, Android M 3-11-2015
 

Recently uploaded

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 

Recently uploaded (20)

What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 

iOS Application Lifecycle

  • 2. Application lifecycles  Applications and processes may transition between several states  active  paused  stopped  inactive  suspended  Callback methods allow applications to prepare for and respond to transitions
  • 3. Android lifecycle methods  Lifecycle state transitions trigger event callback methods  Callback events differ based on type of component  Callback methods take place in foreground and should be brief
  • 4. Android Activity Activity. Activity. Activity. Activity. Activity. Activity. onRestore onSave onStart onResume onPause onStop InstanceState InstanceState Activity. Activity. onCreate onDestroy Activity. onRestart Active lifetime Visible lifetime Full lifetime Application is killable
  • 5. Activity callback methods  Implementation of lifecycle method should always first call superclass protected void onPause() { super.onPause(); . . . }
  • 6. Activity transition Activity A Activity B ActivityA. onPause ActivityB. onCreate ActivityB. onStart ActivityB. onResume ActivityA. onStop
  • 7. Android Service Service. Service. Service. onCreate onStartCommand onDestroy Service. Service. onBind onUnbind Service. onRebind
  • 8. Service binding methods Activity Service bindService() .onBind() ServiceConnection. onServiceConnected unbindService() .onUnbind() ServiceConnection. onServiceDisconnected
  • 9. Android BroadcastReceiver BroadcastReceiver. onReceive  Only active while handling onReceive() method
  • 10. Android ContentProvider ContentProvider. onCreate  Only active while handling methods supporting ContentResolver  query()  insert()  update()  delete()  getType()
  • 11. Processes and lifecycles  Old processes removed when memory runs low  Selection base on importance hierarchy 1. Foreground process 2. Visible process 3. Service process 4. Background process 5. Empty process
  • 12. iOS Application lifecycle  UIApplication notified of state transition events  Handled by application delegate  application:didFinishLaunchingWithOptions:  applicationDidBecomeActive:  applicationWillResignActive:  applicationDidEnterBackground:  applicationWillEnterForeground:  applicationWillTerminate:
  • 13. Pre – iOS 4 application:didFinishLaunchingWithOptions: applicationDidBecomeActive: Active applicationWillTerminate:
  • 15. iOS Transition to background
  • 16. iOS Return to foreground
  • 17. iOS Interruption handling UIKit Delegate Active Phone, SMS, or Calendar applicationWillResignActive: notification arrives Ignore Yes applicationDidBecomeActive: ? No Application moves to applicationDidEnterBackground: background
  • 18. iOS 4 Application lifecycle application:didFinishLaunchingWithOptions: applicationDidBecomeActive: Ignore interrupt Active applicationWillEnterForeground: applicationWillResignActive: applicationDidEnterBackground: Suspended applicationWillTerminate: