首页 > 解决方案 > 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.

enter image description here 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)

标签: androidxiaomi

解决方案


notificationChannel.setShowBadge(true)

  • 默认情况下会显示通知标记,要以编程方式更改此设置,我们必须先卸载程序并重新安装。

推荐阅读