Silent push notifications allow background updates without interrupting the user. They are automatically handled within the SDK but can be customized for specific use cases.
Android SDK
Default Handling
Silent push notifications are automatically processed by the SDK in the onMessageReceived method.
Custom Handling
If you have other notification systems or multiple sources, use the dengage.showdengagenotification function to check whether Dengage should display the notification.
If dengage.showdengagenotification returns false, you can add custom logic to distinguish the notification’s source and decide whether or not to show it.
Example:
override fun onMessageReceived(remoteMessage: RemoteMessage) {
super.onMessageReceived(remoteMessage)
// Check if the notification should be shown by Dengage
if (DengageUtils.showDengageNotification(remoteMessage.data)) {
ContextHolder.resetContext(context = this)
Dengage.onMessageReceived(remoteMessage.data)
} else {
// Extract the payload from the notification
val dataPayload = remoteMessage.data
// Check for the custom identifier "source"
val customSource = dataPayload["source"]
if (customSource != null && customSource == "your_custom_source") {
// Handle notification from your custom source
handleCustomSourceNotification(dataPayload)
} else {
// Handle other cases if needed
Log.d("CustomNotification", "Notification is not from the custom source.")
}
}
}
iOS
On iOS, silent push notifications are automatically handled by the operating system. No extra configuration is needed.
How to Access and Enable Silent Push
Step 1: Navigate to Application Settings
- Go to Settings > Integrations > Applications.
Step 2: Create or Edit an Application
- To create a new application:
- Click the New button.
- Choose the application type (iOS, Huawei, or Android).
- To edit an existing application:
- Select an existing application from the list and edit.
Step 3: Enable Silent Push
- Under the Push Notifications section, ensure that Push Notifications are enabled.
- Check the Uninstall Tracking option to enable Silent Push.

iOS Uninstall Tracking

Android Uninstall Tracking

Huawei Uninstall Tracking
Step 4: Save Changes
- Click Save to apply the settings.
When Uninstall Tracking is enabled under Push Notification, a silent push is sent at night. Devices that have uninstalled the app are detected during the nightly calculation, and their statuses are updated accordingly.