java.lang.Object | |
↳ | com.urbanairship.app.GlobalActivityMonitor |
Global activity monitor.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
GlobalActivityMonitor() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
void |
addActivityListener(ActivityListener listener)
Adds an activity listener.
| ||||||||||
void |
addApplicationListener(ApplicationListener listener)
Adds an application listener.
| ||||||||||
List<Activity> |
getResumedActivities()
Gets the list of current resumed activities.
| ||||||||||
List<Activity> |
getResumedActivities(Predicate<Activity> filter)
Gets the list of current resumed activities that match the filter.
| ||||||||||
boolean |
isAppForegrounded()
Determines if the application is in the foreground.
| ||||||||||
void |
removeActivityListener(ActivityListener listener)
Removes an activity listener.
| ||||||||||
void |
removeApplicationListener(ApplicationListener listener)
Removes an application listener.
| ||||||||||
static GlobalActivityMonitor |
shared(Context context)
Creates and retrieves the shared activity monitor instance.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.urbanairship.app.ActivityMonitor
|
Adds an activity listener.
listener | The added listener. |
---|
Adds an application listener.
listener | The added listener. |
---|
Gets the list of current resumed activities.
Gets the list of current resumed activities that match the filter.
filter | A predicate to filter out activities from the result. |
---|
Determines if the application is in the foreground.
true
if the application is in the foreground, otherwise
false
.
Removes an activity listener.
listener | The removed listener. |
---|
Removes an application listener.
listener | The removed listener. |
---|
Creates and retrieves the shared activity monitor instance.
context | The application context. |
---|