Skip to content

Instantly share code, notes, and snippets.

John McDonnell jlmcdonnell

  • London, UK
Block or report user

Report or block jlmcdonnell

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

Keybase proof

I hereby claim:

  • I am jlmcdonnell on github.
  • I am mcdonnell ( on keybase.
  • I have a public key whose fingerprint is 9B82 F9E5 E131 DDBB 80A6 065D 0B67 ED0F 77CE 2907

To claim this, I am signing this object:

* Copyright Google Inc. All Rights Reserved.
* <p/>
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* <p/>
* <p/>
* Unless required by applicable law or agreed to in writing, software
View .gitignore
import android.content.Context;
jlmcdonnell / BetterActivityLifecycleCallbacks
Last active Aug 29, 2015
Android - Better Activity lifecycle callbacks
View BetterActivityLifecycleCallbacks
* This class allows you to listen to when the user is entering the background (i.e. after a home button press,
* or opening recent apps etc) and when the user resumes the application from the background.
* @author John McDonnell
public class BetterActivityLifecycleCallbacks implements Application.ActivityLifecycleCallbacks {
private int mForegroundActivities;
You can’t perform that action at this time.