You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+25Lines changed: 25 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,31 @@ Note that after a reboot the `smallIcon` and `largeIcon` are not restored but fa
81
81
)
82
82
```
83
83
84
+
### Notification icons
85
+
86
+
> __Background information:__ Local notifications may fail silently if you don't provide the notification icons in the correct dimensions. They may do work perfectly fine on one device but fail on the other. That's because android might fallback to your xxxhdpi launcher icon which is too big. This type of error is noticeable in logcat: `!!! FAILED BINDER TRANSACTION !!! (parcel size = 1435376)`
87
+
88
+
#### Spec for ic_stat_notify.png (smallIcon)
89
+
90
+
[Android API Guides → Status Bar Icons](https://developer.android.com/guide/practices/ui_guidelines/icon_design_status_bar.html)
91
+
92
+
#### Spec for ic_notify.png (largeIcon)
93
+
94
+
Unfortunately it seems like there's no official guide for these. Anyways there's a [dimen](https://github.com/android/platform_frameworks_base/blob/2d5dbba/core/res/res/values/dimens.xml#L181) that's telling us the dp size which we can translate to the following spec:
95
+
96
+
| Density qualifier | px | dpi
97
+
| -- | -- | --
98
+
| ldpi | 48 x 48 | 120
99
+
| mdpi | 64 x 64 | 160
100
+
| hdpi | 96 x 96 | 240
101
+
| xhdpi | 128 x 128 | 320
102
+
| xxhdpi | 192 x 192 | 480
103
+
104
+
__Don't include xxxhdpi__
105
+
106
+
> __xxxhdpi__: Extra-extra-extra-high-density uses (__launcher icon only__, see the note in Supporting Multiple Screens); approximately 640dpi. Added in API Level 18
0 commit comments