feat(android): support custom local notification icon #1830
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support for android custom local notification icon.
Added a
smallIcon
property toLocalNotificatoin
. Can accept values of bothres://icon_name
andicon_name
types (to stay consistent with the attachments'url
prop). Will only look inside theres/drawables
directory since themipmap
one is supposed to be used only for launcher icons.If no custom icon is set or if the custom one cannot be found, the standard android info icon will be used instead.
If this gets merged, the docs need to be updated to make clear that the custom icon needs to follow Android's guidelines (see the top answer here: https://stackoverflow.com/questions/45318614/why-is-my-smallicon-for-notifications-always-greyed-out) or else the it won't be displayed.
Closes #1752
Closes #1510