O'Reilly logo

Reactive Android Programming by Tadas Subonis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Lifecycle review

Most readers will be familiar thoroughly with Android Lifecycle. However, it is always useful to review this as it is a super important thing, and there might be some readers who haven't had a chance to know it so well.

Readers will find everything and more in the official documentation page at https://developer.android.com/guide/components/activities/activity-lifecycle.html.

The Android Activity Lifecycle describes an order and conditions on which the special methods are called:

  • onCreate()
  • onStart()
  • onResume()
  • onPause()
  • onStop()
  • onDestroy()

Developers have to override them so that their code can get called at the points in the lifecycle specific to an activity:

In the preceding figure (taken from https://developer.android.com/guide/components/activities/activity-lifecycle.html ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required