Icons size for push notifications

The best articles on the topic I could find: one and two

But in game.project has more fields than I found:

Does somebody know which size of icons needs for push notifications on android? Would be great to have pack of psd templates or something like this.

Thanks.

1 Like

The small icon will be used for NotificationBuilder.setSmallIcon() and the large icon for NotificationBuilder.setLargeIcon().

You can use the online tool Android Asset Studio to generate icons for all sizes.

2 Likes

Thanks for the link, but in game project we have more fields than created by the generator and I don’t understand is that a big icon or a small and how to make ldpi

Not really sure. @sven might know.

Sizes are documented here though: https://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar#size11

And as far as I can tell the Android OS will scale icons to the correct size and if an icon is missing it will take the nearest one in size and scale it.

1 Like

I tried to put icons with different sizes in fields, but on device it’s still app icon instead of my push icons.

I hope @Sven knows how it works and can help me with this big list of icons in game.project.

I’m not an expert on push icons, but I just tried adding a 36px as small icon and a 72px as large and it looks like this:

The project file looks like this:

Push icons:
icon_push_72icon_push_36

Regular app icons:
icon_72 (just 72px here but you get the idea…)

I didn’t add all size variants for the push icon, but by going with this guide maybe you could experiment with them as well: https://www.creativefreedom.co.uk/icon-designers-blog/android-4-1-icon-size-guide-made-simple/

3 Likes

I find this really confusing!
I do understand that you somehow wanted to “simplify” things with these Push icons but instead there is nowhere on Android OR Defold documentation to be found what you actually mean with all these fields in the project files.

First of all: Is the 2 sets of dpi’s (Small and Large) different standards due to Android 2.3 vs Android 3.0 ? As it all has kinda been renamed it’s hard to tell. There is no site out there that could explain the fields in game.project. I just don’t like guessing or defaulting to a couple that makes it blurry on some devices and even worse breaks the design rules on some.

Where did they all come from? How are we to interpret them?

1 Like

We use the NotificationCompat.Builder when creating notifications. Android notifications has support for a small and a large icon, and that is why you find both Push Icon Small *dpi and Push Icon Large *dpi in game.project.

The Push Icon Small and Push Icon Large fields seems to be used for Android OS versions less than 2.3 (which we don’t support anyway). @sven could probably tell us more about this.