proximity-sdk / com.estimote.proximity_sdk.api / ProximityTriggerBuilder / displayNotificationWhenInProximity

displayNotificationWhenInProximity

fun displayNotificationWhenInProximity(notification: Notification): NotificationProximityTriggerBuilder

Triggers given notification when the device enters the range of Estimote Beacons.

Important: This notification may be displayed several times while the user is being inside the beacons' range. It means, that if the user dismiss the notification, it may reappear again. We strongly suggest not to annoy your users, which may result in bad UX. In order to be user-friendly, you should implement custom logic to handle notification dismissing, where you would stop this trigger from displaying the notification (see ProximityTrigger stop() methods. ]

If you want your notification to be displayed only on first time, consider using NotificationProximityTriggerBuilder.triggerOnlyOnce.

Parameters

notification - Notification object to display in the user's notification bar. You need to make sure this object is built properly. You can read more about how to do it here: https://developer.android.com/training/notify-user/build-notification.html

Return
ProximityTriggerBuilder builder object for further configuration.