I want to play the notification ringtone sound even though DND mode is enabled on the Android device.
For this, I was requesting DND Override permission (android.permission.ACCESS_NOTIFICATION_POLICY
). Once the user grants the permission then while creating the notification channel I'm setting channel.setBypassDnd(true)
to bypass the DND mode.
This approach is working fine on Samsung & Google Pixel devices but not working on OnePlus ( Android 12, OxygenOS 12.1) & OPPO