android - 如何摆脱 Android N 上 RemoteInput 通知的进度指示器?

标签 android android-7.0-nougat

我在 N Developer Preview 1 上使用 RemoteInput 允许用户输入一些文本作为 Notification 的一部分。它起作用了,但是当用户按下“发送” "按钮,一个不确定的进度指示器出现了,它永远不会消失:

RemoteInput Notification on Android

这是应该发生的吗?我该如何摆脱它?

最佳答案

Is this supposed to happen?

显然,是的。

How do I get rid of it?

更新通知。那可以:

  • RemoteInput 中重新添加以接受新输入,或者
  • 不在 RemoteInput 中添加,但可能会更新 Notification 的其他方面以指示您已收到并处理了输入

或者,如果合适,cancel() Notification

This sample project演示如何使用 RemoteInput 和 N Developer Preview。

关于android - 如何摆脱 Android N 上 RemoteInput 通知的进度指示器?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35988259/

相关文章:

android - 相机在 Nougat 7.0 中不工作

Android:使用 FileProvider 的外部存储文件的 URI

android - 以编程方式更改系统显示大小 Android N

android - future 已经完成的 flutter 错误

c# - 实时多人房间创建进度停留在 20%

android - 从 dialogFragment 返回后 getActivity() 返回 null

Android 7.0 Doze 是否停止所有通知?

android - 使用 ScanSettings.SCAN_MODE_OPPORTUNISTIC '应用程序扫描太频繁'

java - 如何在项目编译之前将projectS的源代码复制到项目中?

android - 如何在sqlite android上输入特殊字符 ","?