aik*_*v95 1 notifications android heads-up-notifications
我以这种方式发出抬头通知:
Notification.Builder nb = new Notification.Builder(context)
.setSmallIcon(icon)
.setContentTitle("Title")
.setContentText("Content")
.setDeleteIntent(delete)
.setPriority(Notification.PRIORITY_HIGH)
.setVibrate(new long[0]);
notificationManager.notify(1, nb.build()); // TODO hardcode
Run Code Online (Sandbox Code Playgroud)
第一次在测试设备上安装应用程序时,通知会抬头,但是如果我扩展通知区域(抬头仍在运行时)并从那里取消通知,则下次通知不会抬头。重新安装应用程序后,通知会再次提示。请问有什么原因不能使抬头行为保持不变?
抬头通知具有内置的速率限制-如果用户将抬头的通知向上滑动(将其放回通知托盘中)或移至侧面(将其关闭),则这会向系统发出信号,以防止某些人进一步抬头通知时间段(默认情况下为一分钟)。
| 归档时间: |
|
| 查看次数: |
1227 次 |
| 最近记录: |