Skip to content

Instantly share code, notes, and snippets.

Just being lazy and crazy

Henry thsaravana

Just being lazy and crazy
Block or report user

Report or block thsaravana

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
thsaravana /
Last active Feb 28, 2018
Used to identify when the app goes to foreground or background
public final class AppTransitionStatus implements Application.ActivityLifecycleCallbacks {
private static final long MAX_BACKGROUND_TIME = 2000;
private Timer timer;
private TimerTask task;
private boolean isBackground = true;
private final Transition transition;
public AppTransitionStatus(@NonNull Transition transition) {
You can’t perform that action at this time.