Foredroid icon indicating copy to clipboard operation
Foredroid copied to clipboard

Utility for detecting and notifying when your Android app goes background / becomes foreground

Results 8 Foredroid issues
Sort by recently updated
recently updated
newest added

the onBecameForeground calls multiple times if you have more than one activity on stack, so if you have three activities on stack, the onBecameForeground calls thrice. how to fix that.

Implemented same as in sample app. onBecameForeground called onBecameBackground never called. At the time of going background listeners becomes empty (due to weak reference) and thus hasn't been called

When I request permission, App became Background. ``` package com.sjl.foreground.demo; import android.Manifest; import android.content.Intent; import android.content.pm.PackageManager; import android.net.Uri; import android.os.Bundle; import android.support.v4.app.ActivityCompat; import android.support.v4.content.ContextCompat; import android.support.v7.app.ActionBarActivity; import android.util.Log; import android.view.View;...

Looks like the delayed check in onActivityPaused() is the reason. Foreground thinks it is the background, altough it is in the foreground. Thus onBecameForeground() gets called when the started activity...

everything works fine until you open a dialog, when the dialog is showing the status of activity change to "background" , when the dialog is closed don't update the status...

When closing an interstital ad from admob the Foreground instance became background instead foreground. It resolves changing the call onActivityResumed to: @Override public void onActivityResumed(Activity activity) { current = activity;...

…true. the previous implemention assumes below is true: 1. ActivityA->ActivityB 1. press back 2.1 ActivityA.onStart 2.1 ActivityB.onStop otherwize, the behavior will be wrong. unfornautely, this assumption is not always true....