BeaconEventLifecycleHandler

Lifecycle handler for tracking Beacon open and close events.

Register this handler with your Application's ActivityLifecycleCallbacks to receive notifications when the Beacon is opened or closed.

Example usage (Java):

BeaconEventLifecycleHandler eventLifecycleHandler =
new BeaconEventLifecycleHandler(
new BeaconOnOpenedListener() {
@Override
public void onOpened() {
// Handle Beacon opened event
}
},
new BeaconOnClosedListener() {
@Override
public void onClosed() {
// Handle Beacon closed event
}
}
);

registerActivityLifecycleCallbacks(eventLifecycleHandler);

To unregister:

unregisterActivityLifecycleCallbacks(eventLifecycleHandler);

Parameters

onOpenedListener

Listener to be called when Beacon is opened (can be null)

onClosedListener

Listener to be called when Beacon is closed (can be null)

Constructors

Link copied to clipboard
constructor(onOpenedListener: BeaconOnOpenedListener?, onClosedListener: BeaconOnClosedListener?)

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open override fun onActivityCreated(activity: Activity, bundle: Bundle?)
Link copied to clipboard
open override fun onActivityDestroyed(activity: Activity)
Link copied to clipboard
open override fun onActivityPaused(activity: Activity)
Link copied to clipboard
open override fun onActivityResumed(activity: Activity)
Link copied to clipboard
open override fun onActivitySaveInstanceState(activity: Activity, bundle: Bundle)
Link copied to clipboard
open override fun onActivityStarted(activity: Activity)
Link copied to clipboard
open override fun onActivityStopped(activity: Activity)