我在通知中显示了一个计时器:
NotificationCompat.Builder builder = new NotificationCompat.Builder(context, CHANNEL)
...
.setUsesChronometer(true)
.setOngoing(true);
NotificationManagerCompat notificationManager = NotificationManagerCompat.from(context);
notificationManager.notify(notificationId, builder.build());
当用户单击该通知时,我想获取经过的时间甚至是计时器的文本。