Skip to content

Instantly share code, notes, and snippets.

View umesh-kushwaha's full-sized avatar

Umesh Singh Kushwaha umesh-kushwaha

  • New Delhi
View GitHub Profile
@umesh-kushwaha
umesh-kushwaha / Foreground.java
Created August 11, 2018 12:30 — 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;
@umesh-kushwaha
umesh-kushwaha / app-module-build.gradle
Created May 10, 2018 15:56 — forked from segunfamisa/app-module-build.gradle
Using gradle extra properties to manage Android dependency versioning
// app module build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion rootProject.compileSdkVersion
buildToolsVersion rootProject.buildToolsVersion
defaultConfig {
applicationId "com.segunfamisa.gradleextraproperties"
minSdkVersion rootProject.minSdkVersion
targetSdkVersion rootProject.targetSdkVersion