This issue can occur if your Android application uses a custom PushwooshNotificationFactory and you have recently updated the Pushwoosh SDK. When multiple notifications are sent to a device, Android may try to group them. If a notification group ID is not properly set in your custom factory, the system can generate an empty summary notification, which appears as a blank push.
There are two ways to resolve this:
1. (Recommended) Update the Pushwoosh SDK
The easiest and most reliable solution is to update your Pushwoosh Android SDK to version 6.7.32 or newer. This version includes a fix that automatically assigns a default notification group if one is not provided by a custom factory, preventing the empty notification issue.
2. Manually Set the Group ID in Your Custom Factory
If you are unable to update the SDK immediately, you can resolve the issue by modifying your CustomNotificationFactory class. Ensure that you are setting a group ID in your NotificationCompat.Builder.
You can do this by extracting the group ID from the push data payload:
import com.pushwoosh.notification.PushwooshNotificationFactory;
import com.pushwoosh.notification.PushData;
import androidx.core.app.NotificationCompat;
public class CustomNotificationFactory extends PushwooshNotificationFactory {
@Override
public NotificationCompat.Builder onGenerateNotification(PushData pushData) {
NotificationCompat.Builder builder = super.onGenerateNotification(pushData);
// Ensure the group ID is set to prevent empty summary notifications
builder.setGroup(pushData.getGroupId());
return builder;
}
}
By implementing one of these solutions, the empty summary notifications will no longer appear. We strongly recommend updating the SDK for a permanent fix.
Comments
0 comments
Please sign in to leave a comment.