thudugala / Plugin.LocalNotification

The local notification plugin provides a way to show local notifications from .Net MAUI and Xamarin Forms apps .
MIT License
401 stars 66 forks source link

How to Bypass Android Volume When Set to Zero and Play Notification Sound at Max Volume #499

Closed lpv-1902 closed 3 weeks ago

lpv-1902 commented 1 month ago

Hi everyone,

I'm working on an Android app and I have a specific requirement for notifications. I need to bypass the system volume settings, especially when the volume is set to zero, and ensure that my notification sound plays at maximum volume. This is similar to how critical alerts work in iOS.

Is there a way to achieve this using this great plugin? Any guidance or examples would be greatly appreciated.

Thank you in advance!

Kebechet commented 1 month ago

is it even possible to do on android devices ?

thudugala commented 3 weeks ago

@lpv-1902 try https://medium.com/@surendar1006/implementing-critical-alerts-on-android-aa49b4d75705

lpv-1902 commented 3 weeks ago

Thanks, I have implemented this using Critical Alerts and a combination of turning off do not disturb, setting ringer mode to Ring, turning notification volume to max and letting the critical alert run. Afterwards I set all the values to their previous setting.