On devices running Android 14 or newer, you might notice that grouped notifications appear empty in the notification tray. This issue commonly occurs if you are using a custom NotificationFactory without explicitly setting a notification group ID.
There are two ways to resolve this:
1. Update the Pushwoosh SDK (Recommended)
The simplest solution is to update the Pushwoosh Android SDK to version 6.7.32 or higher. This version includes a fix that automatically assigns a default notification group if one is not provided by a custom factory, resolving the display issue.
Update your build.gradle dependencies to the latest SDK version:
implementation 'com.pushwoosh:pushwoosh:6.7.32'
implementation 'com.pushwoosh:pushwoosh-badge:6.7.32'
implementation 'com.pushwoosh:pushwoosh-firebase:6.7.32'
Note: Please check our official documentation or GitHub repository for the latest available SDK version.
2. Manually Set the Group ID
If you are unable to update the SDK, you can fix this by manually setting the group ID within your custom NotificationFactory. When constructing your notification, ensure you call the .setGroup() method on your NotificationCompat.Builder.
Here is an example:
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, channel);
// ... other builder configurations ...
builder.setGroup(pushData.getGroupId());
By applying one of these solutions, your grouped notifications will render correctly on all supported Android versions.
Comments
0 comments
Please sign in to leave a comment.