Pulsate allows you to easily segment users, create campaigns and send them your users via IANs. IANs are enabled by default, but you can easily disable or enable IANs for your users.

The setInAppNotificationEnabled(boolean enabled) method allows you to easily opt in or opt out an user from IANs. Default - ENABLED.

This setting is per alias, different aliases can have different values.

Example usage:

val pulsateManager = PulsateFactory.getInstance()
pulsateManager.startPulsateSession(object : IPulsateRequestListener {
		override fun onSuccess() {
      pulsateManager.setInAppNotificationEnabled(true/false)
		}

		override fun onError(e: Throwable?) {
		}
})

If you want to check if users have IANs enabled or disabled use the "isInAppNotificationEnabled()" method.

val pulsateManager = PulsateFactory.getInstance()
pulsateManager.isInAppNotificationEnabled(object : IPulsateValueListener<Boolean?> {
  override fun onSuccess(value: Boolean?) {}
  override fun onError(e: Throwable) {}
})

Show the last In App Notification

For cases where you want to block an In App Notification (IAN) and show it later you can disable IANs using "setInAppNotificationEnabled(false)" and later call "setInAppNotificationEnabled(true)" with "showLastInAppNotification()" to show it. Example usecase - user needs to give password before being able to see IAN.

val pulsateManager = PulsateFactory.getInstance()
// Before Login
pulsateManager.setInAppNotificationEnabled(false)

// After Login
pulsateManager.setInAppNotificationEnabled(true)
pulsateManager.showLastInAppNotification()