Hi!
I wanted to test Big View Notification on my Samsung Galaxy S3 with following code:
But it displays normal notification instead of Big one.
Official doc says:
What can be a problem with my device? On emulator it works just fine.
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:
But I'm running on Android 4.1.2, so it should be supported.Big views were introduced in Android 4.1, and they're not supported on older devices.
What can be a problem with my device? On emulator it works just fine.