17

I'm trying to find the exact dimensions of the big picture style image on Android notification. Indeed, I need those in order to compute images on-the-fly at the right dimensions to avoid too big downloads in my application.

I've made some tests and, for example, I can't take the width of the screen as the width of my image because the notification center does not fit entirely the screen on tablets.

Is there any way to get those dimensions as we do for the large icon with android.R.dimen.notification_large_icon_width and android.R.dimen.notification_large_icon_height ?

Thanks

ArchOrn
  • 171
  • 1
  • 3
  • 1
    It's a great question that I also seeking for an answer currently. I know that it even changed in Android Nougat release. Did you find an answer? – tasomaniac Nov 24 '16 at 10:40
  • Unfortunately not, still no answer. I should make a post on Android forums. – ArchOrn Dec 04 '16 at 12:43
  • @ArchOrn have you find its answer if yes can you please share..thankx – Garg Sep 06 '17 at 07:58

1 Answers1

3

Based on the documentation from OneSignal, a popular notification library:

The image should be a 2:1 aspect ratio, but your main content should be in 43:24 ratio (~1.79) as some devices crop past this width. Android does not have a size limit, however see our recommended minimum, balanced, and maximum sizes below.

Minimum - 512x256 Balanced - 1440x720 Maximum - 2880x1440

So, 1440x720 seems optimal.

Jake Lee
  • 7,549
  • 8
  • 45
  • 86
  • 1
    I also checked their [`notification-preview` tool](https://onesignal.com/notification-preview) (available for both `iOS` & `Android`); there also `2:1` image looks fine: **[1]** fits perfectly for Android **[2]** gets shrinked across width on iOS, but still acceptable – y2k-shubham Jul 29 '20 at 08:34