-
public class ActivityLifecycle
-
-
Constructor Summary
Constructors Constructor Description ActivityLifecycle(Application application)
-
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 -
-
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
-
getCurrentActivityObservable
Observable<Activity> getCurrentActivityObservable()
Doesn't guranty to return Activity right away so it is recommended to usetogether with timeout
-
-
-
-