Skip to content

Instantly share code, notes, and snippets.

Avatar

Vũ Hoàng Dương hoangduong95

View GitHub Profile
@steveliles
steveliles / Foreground.java
Last active Jan 6, 2020
Class for detecting and eventing whether an Android app is currently foreground or background (requires API level 14+)
View Foreground.java
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;
You can’t perform that action at this time.