Xiaomi: what code to request permission to show app badge icon

501 Views Asked by At

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)

1

There are 1 best solutions below

2
On

notificationChannel.setShowBadge(true)

  • Notification badges are shown by default, for changing this setting programmatically we must uninstall the program first and reinstall it.