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

Android Activity Lifecycle

Activities are the core components in Android to show the User Interface. In most cases, all data processing, fetching, and any other action are tied to the Activity.

If you want to fetch the background image over the network, you will probably have to use the onCreate() method to start that. If there is data that you want to be updated when Activity starts--a good choice will be onStart() or onResume(). There are multiple lifecycle methods and, in one of those, an Observable will have to be put along with the Subscriptions.

Also, the created Observables and Subscriptions will often have to be cleaned by the developer. However, before we delve into that, let's review what the Android Activity Lifecycle looks like. ...

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