Skip to content

Instantly share code, notes, and snippets.

View jlmcdonnell's full-sized avatar

John McDonnell jlmcdonnell

  • Dallas, TX
View GitHub Profile
@jlmcdonnell
jlmcdonnell / BetterActivityLifecycleCallbacks
Last active August 29, 2015 14:19
Android - Better Activity lifecycle callbacks
/**
* 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;