Skip to content

Instantly share code, notes, and snippets.

View danielsxavier's full-sized avatar

Daniel da Silva Xavier danielsxavier

  • Cuiabá-MT, Brasil
View GitHub Profile
@danielsxavier
danielsxavier / Foreground.java
Created June 4, 2016 17:04 — forked from steveliles/Foreground.java
Class for detecting and eventing whether an Android app is currently foreground or background (requires API level 14+)
package com.sjl.util;
import android.app.Activity;
import android.app.Application;
import android.content.Context;
import android.os.Bundle;
import android.os.Handler;
import android.util.Log;
import java.util.List;