public final class ActivityTracker
extends java.lang.Object
Activity instances have been created and not yet destroyed in creation
order for use by Stetho features. Note that automatic tracking is not available for
all versions of Android but it is possible to manually track activities using the add(android.app.Activity)
and remove(android.app.Activity) methods exposed below. Be aware that this is an easy opportunity to
cause serious memory leaks in your application however. Use with caution.
Most callers can and should ignore this class, though it is necessary if you are implementing
Activity tracking pre-ICS.| Modifier and Type | Class and Description |
|---|---|
static interface |
ActivityTracker.Listener |
| Constructor and Description |
|---|
ActivityTracker() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(android.app.Activity activity) |
boolean |
beginTrackingIfPossible(android.app.Application application)
Start automatic tracking if we are running on ICS+.
|
boolean |
endTracking() |
static ActivityTracker |
get() |
java.util.List<android.app.Activity> |
getActivitiesView() |
void |
registerListener(ActivityTracker.Listener listener) |
void |
remove(android.app.Activity activity) |
android.app.Activity |
tryGetTopActivity() |
void |
unregisterListener(ActivityTracker.Listener listener) |
public static ActivityTracker get()
public void registerListener(ActivityTracker.Listener listener)
public void unregisterListener(ActivityTracker.Listener listener)
public boolean beginTrackingIfPossible(android.app.Application application)
add(android.app.Activity) or
remove(android.app.Activity) methods.public boolean endTracking()
public void add(android.app.Activity activity)
public void remove(android.app.Activity activity)
public java.util.List<android.app.Activity> getActivitiesView()
public android.app.Activity tryGetTopActivity()