Push Notifications
ASAPP’s systems may trigger push notifications at certain times, such as when an agent sends a message to an end customer who does not currently have the chat interface open. In such scenarios, ASAPP calls your company’s API with data that identifies the recipient’s device, which triggers push notifications. ASAPP’s servers do not communicate with Firebase directly. ASAPP provides methods in the SDK to register and deregister the customer’s device for push notifications. For a deeper dive on how ASAPP and your company’s API handle push notifications, please see our documentation on Push Notifications and the Mobile SDKs. In addition to this section, see Android’s documentation about Firebase Cloud Messaging and specifically how to setup Android Cloud Messaging.Enable Push Notifications
- Identify which token you will use to send push notifications to the current user. This token is usually either the Firebase instance ID or an identifier generated by your company’s API for this purpose.
-
Then, register the push notification token using:
In case you issue a new token to the current user, you also need to update it in the SDK.
Disable Push Notifications
In case the user logs out of the application or other related scenarios, you can disable push notifications for the current user by calling:ASAPP.instance.disablePushNotifications().
Call this function before you change
ASAPP.instance.user
(or clear the session) to prevent the customer from receiving unintended push notifications.Handle Push Notifications
You can verify if ASAPP triggered a push notification and passed a data payload into the SDK.Your application usually won’t receive push notifications from ASAPP if the identified user for this device is connected to chat.
Background Push Notifications
If your app receives a push notification while in the background or closed, the system will display the OS notification. Once the user taps the notification, the app starts withIntent
data from that push notification.
To help differentiate notifications from ASAPP and others your app might receive, ASAPP recommends that the push notification has a click_action
with the value asapp.intent.action.OPEN_CHAT
. For more information on how to set a click action, please see the Firebase documentation. With a click action set to the push notification, you will need to add a new intent filter to match it:
shouldOpenChat
simply checks if the intent action matches the recommended one, but its use is optional.
Foreground Push Notifications
When you receive Firebase push notifications while your app is in the foreground, it will callFirebaseMessagingService.onMessageReceived
. Check if that notification is from ASAPP:
ASAPP.instance.conversationStatusHandler
.
Persistent Notifications

- ongoing, not dismissible notifications.
- low priority and do not vibrate or make sounds.
- managed directly by the SDK and do not require integration changes.
Persistent notifications are not push notifications, which are created and handled by your application.
Customize Persistent Notifications
Notification Title and Icon

Notification Channel
By default, ASAPP sets the notification to Notification Channelasapp_chat
, but it is possible to customize the channel being used.
To customize the channel used by persistent notifications, override the following string resources: