Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android notification: cant set largeIcon as null to hide it when expand notification #270

Closed
andrew-stupchuk opened this issue Dec 20, 2021 · 2 comments · Fixed by #273
Closed

Comments

@andrew-stupchuk
Copy link

Im trying to implement an expandable notification AndroidStyle.BIGPICTURE style type with largeIcon and picture. I want to set largeIcon: null in style property, to hide it when notification is expanded. After that, when I'm trying to call displayNotification I'm receiving an error notifee.displayNotification(*) 'notification.android.style' BigPictureStyle: 'largeIcon' expected a React Native ImageResource value or a valid string URL.

Here is an example of what I'm trying to implement from developer.android.

Library version: 3.0.4
react: 17.0.2
react-native: 0.66.3

Steps To Reproduce:
1)Prepare notification data: set largeIcon, set stype properties: picture, type: AndroidStyle.BIGPICTURE and largeIcon: null
2)Call displayNotification with prepared notification

Describe what you expected to happen:
1)Notification is received
2) largeIcon hides when you expand the notification

@helenaford
Copy link
Member

@andrew-stupchuk thanks for the details, made it easy to reproduce and push up a fix. As soon as it passes on CI and p/r is reviewed, I'll release it

@andrew-stupchuk
Copy link
Author

@helenaford no problem, thanks for the fix)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants