简体   繁体   中英

What should be the image/bitmap size in Android BigPictureStyle push notification?

I want some clarity on image size of BigPictureStyle bitmap in notification.

I have gone through some tutorials but could not find the size specifications about this bitmap.

Some told to have 2:1 aspect ratio.

I want some clarity like what is recommended size of bitmap/image in

 NotificationCompat.BigPictureStyle s = new NotificationCompat.BigPictureStyle().bigPicture(bitmap_image);
        s.setSummaryText("Summary text appears on expanding the notification");
         notificationBuilder.setStyle(s);

please guide me through this.

You can find a Google I/O slideshow presentation here that mentions this (presentation by Chet Haase, Romain Guy & Dan Sandler).

Specifically on slide 52 it states about BigPictureStyle:

Protips

Images should be ≤ 450dp wide, ~2:1 aspect Bitmaps outside these bounds will just be wasting RAM (and possibly exceeding Binder IPC limits)

Note that this presentation is a couple years old, but there is no reason to deviate from its suggestions.

Related: https://code.google.com/p/android/issues/detail?id=36744

it should be an .png image with transparent background .* 710*90* its an image size i am using and its working well . :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM