Skip to content
This repository was archived by the owner on Jan 14, 2025. It is now read-only.

Support using drawable as Android small icon - #1787

Merged
Dallas62 merged 4 commits into
zo0r:devfrom
hojason117:androidDrawableIcon
Dec 23, 2020
Merged

Dallas62 merged 4 commits into
zo0r:devfrom
hojason117:androidDrawableIcon

Conversation

@hojason117

Copy link
Copy Markdown
Contributor

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

Dimon70007 and others added 3 commits November 27, 2020 14:17
May be we should update readme about local notifications for better understanding how should users setup this library on android

@Dallas62 Dallas62 left a comment

Copy link
Copy Markdown
Collaborator

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 😉


if (largeIcon != null && !largeIcon.isEmpty()) {
largeIconResId = res.getIdentifier(largeIcon, "mipmap", packageName);
largeIconResId = res.getIdentifier(largeIcon, "mipmap", packageName);

Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Contributor Author

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 👍

@Dallas62
Dallas62 changed the base branch from master to dev December 23, 2020 07:38
@Dallas62
Dallas62 merged commit 469c167 into zo0r:dev Dec 23, 2020
@Dallas62

Copy link
Copy Markdown
Collaborator

Thanks for this PR !

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android] Can smallIcon is only from mipmap?

3 participants