-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Support using drawable as Android small icon #1787
Conversation
May be we should update readme about local notifications for better understanding how should users setup this library on android
Update README.md
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @hojason117
Thanks for this PR, there is only one change missing to be merged 😉
@@ -341,9 +344,9 @@ public void sendToNotificationCentreWithPicture(Bundle bundle, Bitmap largeIconB | |||
String largeIcon = bundle.getString("largeIcon"); | |||
|
|||
if (largeIcon != null && !largeIcon.isEmpty()) { | |||
largeIconResId = res.getIdentifier(largeIcon, "mipmap", packageName); | |||
largeIconResId = res.getIdentifier(largeIcon, "mipmap", packageName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should also include the same kind of condition, like it was made with smallIcon
to get drawable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same condition for large icon added 👍
Thanks for this PR ! |
Add support for using drawable resource as Android local notification small icon.
Default using drawable since Image Asset Studio puts notification icons in there.
fixes #1594