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

Support using drawable as Android small icon #1787

Merged
merged 4 commits into from
Dec 23, 2020

Conversation

hojason117
Copy link
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
Copy link
Collaborator

@Dallas62 Dallas62 left a 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);
Copy link
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
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
Collaborator

Thanks for this PR !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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