How to set icon on OneSignal notification?

I buy RocketWeb from codecanyon and configure full project now I want to add my own icon in the notification.

First of all, here is the official guideline: https://documentation.onesignal.com/docs/customize-notification-icons#section-1-generate-icons

According to the guideline, we can set small and large icons in the notification. You can also set a BIG PICTURE in a notification.

  • The BIG PICTURE and LARGE ICON set are very easy. During send the notification just upload your image.
  1. Minimum – 512×256
  2. Balanced – 1440×720
  3. Maximum – 2880×1440
  • For a small icon, you need to set some images on the different drawable folder (codecanyon -> src -> main -> res). If the folders are not available then you need to create and add image must be on ic_stat_onesignal_default.png in png format.

Here is the folder name with size:

res/drawable-mdpi/ (24×24)
res/drawable-hdpi/ (36×36)
res/drawable-xhdpi/ (48×48)
res/drawable-xxhdpi/ (72×72)
res/drawable-xxxhdpi/ (96×96)

2 thoughts on “How to set icon on OneSignal notification?

Leave a Reply