public class BrazeActivityLifecycleCallbackListener
extends java.lang.Object
implements android.app.Application.ActivityLifecycleCallbacks
Constructor and Description |
---|
BrazeActivityLifecycleCallbackListener()
A default constructor equivalent to calling BrazeActivityLifecycleCallbackListener(true, true, Collections.
|
BrazeActivityLifecycleCallbackListener(boolean sessionHandlingEnabled,
boolean registerInAppMessageManager) |
BrazeActivityLifecycleCallbackListener(boolean sessionHandlingEnabled,
boolean registerInAppMessageManager,
java.util.Set<java.lang.Class<?>> inAppMessagingRegistrationBlocklist,
java.util.Set<java.lang.Class<?>> sessionHandlingBlocklist) |
BrazeActivityLifecycleCallbackListener(java.util.Set<java.lang.Class<?>> inAppMessagingRegistrationBlocklist)
Constructor that only sets a blocklist for
BrazeInAppMessageManager registration and enables
BrazeInAppMessageManager registration. |
BrazeActivityLifecycleCallbackListener(java.util.Set<java.lang.Class<?>> inAppMessagingRegistrationBlocklist,
java.util.Set<java.lang.Class<?>> sessionHandlingBlocklist)
Constructor that sets a blocklist for session handling and
BrazeInAppMessageManager registration while also enabling both features. |
Modifier and Type | Method and Description |
---|---|
void |
onActivityCreated(android.app.Activity activity,
android.os.Bundle bundle) |
void |
onActivityDestroyed(android.app.Activity activity) |
void |
onActivityPaused(android.app.Activity activity) |
void |
onActivityResumed(android.app.Activity activity) |
void |
onActivitySaveInstanceState(android.app.Activity activity,
android.os.Bundle bundle) |
void |
onActivityStarted(android.app.Activity activity) |
void |
onActivityStopped(android.app.Activity activity) |
void |
setInAppMessagingRegistrationBlacklist(java.util.Set<java.lang.Class<?>> blocklist)
Deprecated.
Please use
setInAppMessagingRegistrationBlocklist(Set) |
void |
setInAppMessagingRegistrationBlocklist(java.util.Set<java.lang.Class<?>> blocklist)
Sets the
Object.getClass() blocklist for which in-app message registration will not occur. |
void |
setSessionHandlingBlacklist(java.util.Set<java.lang.Class<?>> blocklist)
Deprecated.
Please use
setSessionHandlingBlocklist(Set) |
void |
setSessionHandlingBlocklist(java.util.Set<java.lang.Class<?>> blocklist)
Sets the
Object.getClass() blocklist for which session handling will not occur. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
onActivityPostCreated, onActivityPostDestroyed, onActivityPostPaused, onActivityPostResumed, onActivityPostSaveInstanceState, onActivityPostStarted, onActivityPostStopped, onActivityPreCreated, onActivityPreDestroyed, onActivityPrePaused, onActivityPreResumed, onActivityPreSaveInstanceState, onActivityPreStarted, onActivityPreStopped
public BrazeActivityLifecycleCallbackListener()
public BrazeActivityLifecycleCallbackListener(boolean sessionHandlingEnabled, boolean registerInAppMessageManager)
sessionHandlingEnabled
- When true, handles calling openSession and closeSession in
Application.ActivityLifecycleCallbacks#onActivityStarted(Activity)
(Activity)}
and Application.ActivityLifecycleCallbacks#onActivityStopped(Activity)
(Activity)} respectively.registerInAppMessageManager
- When true, registers and unregisters the InAppMessageManager in
Application.ActivityLifecycleCallbacks#onActivityResumed
and Application.ActivityLifecycleCallbacks#onActivityPaused(Activity)
respectively.public BrazeActivityLifecycleCallbackListener(java.util.Set<java.lang.Class<?>> inAppMessagingRegistrationBlocklist, java.util.Set<java.lang.Class<?>> sessionHandlingBlocklist)
BrazeInAppMessageManager
registration while also enabling both features.inAppMessagingRegistrationBlocklist
- A set of Activity
s for which in-app message
registration will not occur. Each class should be retrieved via Object.getClass()
.sessionHandlingBlocklist
- A set of Activity
s for which session handling
will not occur. Each class should be retrieved via Object.getClass()
.public BrazeActivityLifecycleCallbackListener(java.util.Set<java.lang.Class<?>> inAppMessagingRegistrationBlocklist)
BrazeInAppMessageManager
registration and enables
BrazeInAppMessageManager
registration. Session handling is enabled and has an empty blocklist.inAppMessagingRegistrationBlocklist
- A set of Activity
s for which in-app message
registration will not occur. Each class should be retrieved via Object.getClass()
.
If null, an empty set is used instead.public BrazeActivityLifecycleCallbackListener(boolean sessionHandlingEnabled, boolean registerInAppMessageManager, java.util.Set<java.lang.Class<?>> inAppMessagingRegistrationBlocklist, java.util.Set<java.lang.Class<?>> sessionHandlingBlocklist)
sessionHandlingEnabled
- When true, handles calling openSession and closeSession in onActivityStarted
and onActivityStopped respectively.registerInAppMessageManager
- When true, registers and unregisters the BrazeInAppMessageManager
in
Application.ActivityLifecycleCallbacks#onActivityResumed
and Application.ActivityLifecycleCallbacks#onActivityPaused(Activity)
respectively.inAppMessagingRegistrationBlocklist
- A set of Activity
s for which in-app message
registration will not occur. Each class should be retrieved via Object.getClass()
.
If null, an empty set is used instead.sessionHandlingBlocklist
- A set of Activity
s for which session handling
will not occur. Each class should be retrieved via Object.getClass()
.
If null, an empty set is used instead.@Deprecated public void setInAppMessagingRegistrationBlacklist(java.util.Set<java.lang.Class<?>> blocklist)
setInAppMessagingRegistrationBlocklist(Set)
public void setInAppMessagingRegistrationBlocklist(java.util.Set<java.lang.Class<?>> blocklist)
Object.getClass()
blocklist for which in-app message registration will not occur.@Deprecated public void setSessionHandlingBlacklist(java.util.Set<java.lang.Class<?>> blocklist)
setSessionHandlingBlocklist(Set)
public void setSessionHandlingBlocklist(java.util.Set<java.lang.Class<?>> blocklist)
Object.getClass()
blocklist for which session handling will not occur.public void onActivityStarted(android.app.Activity activity)
onActivityStarted
in interface android.app.Application.ActivityLifecycleCallbacks
public void onActivityStopped(android.app.Activity activity)
onActivityStopped
in interface android.app.Application.ActivityLifecycleCallbacks
public void onActivityResumed(android.app.Activity activity)
onActivityResumed
in interface android.app.Application.ActivityLifecycleCallbacks
public void onActivityPaused(android.app.Activity activity)
onActivityPaused
in interface android.app.Application.ActivityLifecycleCallbacks
public void onActivityCreated(android.app.Activity activity, android.os.Bundle bundle)
onActivityCreated
in interface android.app.Application.ActivityLifecycleCallbacks
public void onActivitySaveInstanceState(android.app.Activity activity, android.os.Bundle bundle)
onActivitySaveInstanceState
in interface android.app.Application.ActivityLifecycleCallbacks
public void onActivityDestroyed(android.app.Activity activity)
onActivityDestroyed
in interface android.app.Application.ActivityLifecycleCallbacks