nm.notify(NotificationUtil.TIMING_NOTIFICATION_ID, mTimingNotificationBuilder.build());
主要是更新了 Actions 之后再 notify 有时会很慢,大约间隔 2 秒后会刷新成功,比较高频出现:
mTimingNotificationBuilder.mActions.clear();
for (NotificationCompat.Action action :actions) {
mTimingNotificationBuilder.addAction(action);
}
这个问题困扰我挺久的,完全没有头绪,你说它不正常 notify 成功还好,但就是要隔一段肉眼可见的时间才能正常 notify 成功。关于那 Actions 总共就 4 个,两两一组根据业务条件更换。
一些其它信息: