如何删除 android 前台服务通知开始通知的持续时间?
How to remove the time duration when the notification started on the notification of an android foreground service?
Here is the notification with the highlighted duration(2m) when the notification started.I don not want to display it.
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.notification_icon)
.setContentTitle("My notification")
.setContentText("Hello World!")
.setContentIntent(pendingIntent)
.setWhen(0);
setWhen(0) 使通知中的持续时间为空。
Here is the notification with the highlighted duration(2m) when the notification started.I don not want to display it.
NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(this)
.setSmallIcon(R.drawable.notification_icon)
.setContentTitle("My notification")
.setContentText("Hello World!")
.setContentIntent(pendingIntent)
.setWhen(0);
setWhen(0) 使通知中的持续时间为空。