• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Notification: big

surlac

Newbie
Jun 17, 2012
25
4
Hi!
I wanted to test Big View Notification on my Samsung Galaxy S3 with following code:

Code:
Notification.Builder builder = new Notification.Builder(this);
builder.setSmallIcon(android.R.drawable.btn_star);
builder.setTicker("Android Image downloaded.");
builder.setContentTitle("Android Image downloaded.");
builder.setContentText("View in full screen mode");
builder.setLargeIcon(((BitmapDrawable)getResources().getDrawable(android.R.drawable.ic_lock_lock)).getBitmap());
builder.setAutoCancel(true);

Notification.BigPictureStyle bigPicutureStyle = new Notification.BigPictureStyle(builder);

bigPicutureStyle.bigLargeIcon(((BitmapDrawable)getResources().getDrawable(android.R.drawable.ic_lock_lock)).getBitmap());

bigPicutureStyle.bigPicture(((BitmapDrawable)getResources().getDrawable(android.R.drawable.ic_lock_lock)).getBitmap());
bigPicutureStyle.setBigContentTitle("Android Image downloaded.");
bigPicutureStyle.setSummaryText("Click on the image for full screen preview");

((NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE)).notify(01, bigPicutureStyle.build());

But it displays normal notification instead of Big one.
Official doc says:
Big views were introduced in Android 4.1, and they're not supported on older devices.
But I'm running on Android 4.1.2, so it should be supported.
What can be a problem with my device? On emulator it works just fine.
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones