Push notifications are one of the best ways to reach out to your users. Pulsate allows you to easily segment users, create campaigns and send them yo your users via push notifications. Push notifications are enabled by default, but you can easily opt in or opt out an user from Pulsate push notifications.

The setPushNotificationEnabled(boolean enabled) method allows you to easily opt in or opt out an user from Pulsate push notifications. This effects only pushes that Pulsate sends. Default - ENABLED.

Example usage

val pulsateManager = PulsateFactory.getInstance()
if (user.allowsPushNotifications) {
    pulsateManager.setPushNotificationEnabled(true) // Opt In
} else {
    pulsateManager.setPushNotificationEnabled(false)
}

To check if the current user is opt in or opt out of Push Notifications you can use the isPushNotificationEnabled method.

When the push notification opt out is turned on, users who have opted out of push notifications will not receive any push notifications from Pulsate. This includes both Campaigns and Converse Messages. Users that have opted out of push notifications will still be able to receive In App Notifications and they will also receive campaign cards in the Pulsate feed, including any cards that are sent in push notification campaigns.

If you wish to retrieve a list of users that have opted out of push notifications, you can use the Push Opt Outs: Get All API endpoint.