Orb have its own lifecycle that bound to the context activity.
Listening to Orb Lifecycle
You can use the
OrbListener interface to implement a callback when Orb lifecycle method is called.
To apply the listener, you can use the
You can also implement an
OrbListener to your current Activity or Fragment, and set
this as parameter to
or, you can apply the
OrbListener directly by creating its new instance :
If you've set a listener to Orb, and then you set another listener to it, Orb will overwrite the old listener.
OrbListener have several methods that can be overridden if you've implemented it in your Activity or Fragment
class. Here's the
OrbListener's method :
|Called after client code calls .observe()|
|Called when activity lifecycle calls .onResume()|
|Called when activity lifecycle calls .onPause()|
|Called after client code calls .stop()|