I am sending a notification in my app from FCM console and working fine in below android 9 devices, In the above android 9 device Time is not displayed in the notification.
below is my code -
NotificationCompat.Builder mBuilder;
mBuilder.setSmallIcon(icon).setTicker(title).setWhen(0)
.setAutoCancel(true)
.setContentTitle(title)
.setContentIntent(resultPendingIntent)
.setSound(alarmSound)
.setWhen(getTimeMilliSec(timeStamp))
.setShowWhen(true)
.setSmallIcon(smallicon)
.setContentText(message)
.setColor(colorPrimary)
.setPriority(NotificationCompat.PRIORITY_HIGH)
.setVibrate(new long[0])
.build();
After adding two-parameter to notification compact still not working -
.setWhen(getTimeMilliSec(timeStamp))
.setShowWhen(true)
Any solution?