Package 

Class ActivityLifecycle

    • Method Summary

      Modifier and Type Method Description
      Optional<Activity> getCurrentActivityNullable() There is a possibility that current activity will be returned null.
      Observable<Activity> getCurrentActivityObservable() Doesn't guranty to return Activity right away so it is recommended to usetogether with timeout
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ActivityLifecycle

        ActivityLifecycle(Application application)
    • Method Detail

      • getCurrentActivityNullable

        @Nullable() Optional<Activity> getCurrentActivityNullable()

        There is a possibility that current activity will be returned null. Some examples:* Application is being destroyed* Current top activity is being recreated because of rotation but for short time in will be null