Icons are a way to provide a more unique, branded experience to your notifications.
256x256
pixels. Filetypes PNG, JPG, and GIF (not animated) are supported.
Upload your icon or use a URL to an image in in your Dashboard Web Settings.
256x256
pixels.
Generate icons
ic_stat_onesignal_default
as the name.Name | Density (dp) | Size (px) |
---|---|---|
ic_stat_onesignal_default | MDPI | 24x24 |
ic_stat_onesignal_default | HDPI | 36x36 |
ic_stat_onesignal_default | XHDPI | 48x48 |
ic_stat_onesignal_default | XXHDPI | 72x72 |
ic_stat_onesignal_default | XXXHDPI | 96x96 |
ic_onesignal_large_icon_default.png | XXXHDPI | 256x256 |
Create project paths
res/drawable-mdpi/
(24x24)res/drawable-hdpi/
(36x36)res/drawable-xhdpi/
(48x48)res/drawable-xxhdpi/
(72x72)res/drawable-xxxhdpi/
(96x96)res/drawable-xxxhdpi/
(256x256) (Large Icon)<project-root>/platforms/android/res/drawable-{size}/
instead of the path shown above when adding the icon resource to config.xml
How to send push with non-default icons (Optional)
Generate icons
Name non-default icons
message_icon
.Send notifications with non-default icons
small_icon
and large_icon
REST API properties. Set the icon name without the file extension. More details in Create notification REST API docs.res/values/strings.xml
file in your project.
If you want a different color for dark mode, add the key to your res/values-night/strings.xml
as well.
Use the HEX value. Use Android Asset Studio Color scheme for assistance.
android_accent_color
on our Create notification API call or enter a value in the Accent color field under Messages > New Push > Platform Settings > Google Android Options.