Push Notification icon validation happens too soon
tinsukE opened this issue · 0 comments
Currently, when receiving a Push Notification, the first thing (besides the nullability check) that LeanplumPushService.showNotification() does is to check if this Android issue could be triggered: https://issuetracker.google.com/issues/68716460.
So, on a device with Android 26 or greater, in an App with adaptive icons, you need to provide a icon named leanplum_default_push_icon
, otherwise your notifications are just dropped (not shown).
Expected Behavior
The SDK should perform the mentioned check after letting the provided LeanplumPushNotificationCustomizer
, if any, set the notification icon.
Actual Behavior
The SDK ignores future changes that a customizer can make to the notification.
As it is, the application may provide a leanplum_default_push_icon
, the icon check would pass, but the customizer could set the icon to the faulty adaptive icon drawable again, and the Android issue could happen nonetheless.
Steps to Reproduce the Problem
- On a device with Android version 26 or greater
- In an App with adaptive icon
- Provide a valid
leanplum_default_push_icon
- Configure a
LeanplumPushNotificationCustomizer
that changes the notification icon to your App icon - Voilá
Specifications
- Version: 4.2.3
- Platform: Android
- Subsystem: AndroidSDKFcm