android - Xiaomi: what code to request permission to show app badge icon
问题描述
My app gets notification, but, to show notification badgen it needs the "show app badge icon" in parameter > app > notification > show app badge icon.
What's the code for my app to ask this permission ? (prompting something that would send the user to this screen, and he can allow notification badges)
解决方案
notificationChannel.setShowBadge(true)
- 默认情况下会显示通知标记,要以编程方式更改此设置,我们必须先卸载程序并重新安装。
推荐阅读
- java - 向 LINE Notify 发送消息失败(使用 HttpsURLConnection POST)
- php - PHP未定义变量,但它已定义并具有值
- ipython - 即使在我的电脑中安装了 ipython 和 jupyter,也无法打开 .ipynb 文件
- javascript - 如何在 NODEJS 中做到这一点?
- ethernet - 调试模式后 STM32F767ZI 的 Ping 测试失败
- c++ - C++函数设计
- javascript - 如何在 React js 中加载脚本?脚本不起作用
- c++ - 这行代码“int **v = new int*[n];”中的内存是如何分配的?
- scala - 如何在 Spark Structured Streaming 中获取 flatMapGroup 中的所有数据?
- retrofit2 - 如何在 RxJava 中更改“RoomDatabase and Retrofit”