Android: Play ringtone on notification

Created on 19 Apr 2020  路  7Comments  路  Source: home-assistant/android

I think it would be nice, if we could have critical notification play ringtone, like when you're receiving a call. If its critical, it should be ringing until confirmed by the phone user, maybe limited by the time.

The great example is also "find my phone" on google, where you can make your phone ring. Well something like that.

I think little ding sound is easily missed for critical notifications.

Regards.

enhancement notifications

All 7 comments

This might be solvable when notification channels get added, but having it ring until confirmed may not be possible but you will be able to set a longer ringtone on just those.

I was about to log a bug to say high priority notifications don't overide default Android silent, and came across this so it looks like it's not a bug, it just doesn't exist yet.

SImilar functionlity can be seen when using the pushover service. A "1" is high priority, and a "2" is critical. You set a retry timeout, and a total expiry time.

I was hoping to move away from pushover and use the native app but until I can make sure I'll always recieve high priority notifications, regardless of my phone being on silent or not, I'll have to stick with the laggy Pushover.

So it looks like in order to ignore the phone being on silent/vibrate we need to use the alarm stream so it can ring no matter what.

https://stackoverflow.com/questions/15578812/troubles-play-sound-in-silent-mode-on-android

This would be pretty useful actually especially for really important things like the alarm being triggered or smoke in the house etc...

Doesn't look fresh, 2014 ish

So do we want to introduce a new setting to use the alarm stream or do we attempt to piggy back off the critical notification example to match iOS? Personally I was thinking if we can just use a specific channel (ex: channel: alarm-stream) that would be great but then that means anyone on Android 7 and lower won't be able to use it.

@Elyx0 its ok if its old....a lot of stuff on stackoverflow is still relevant as the underlying API's have not changed much. In this case the ringtone and stream are still there.

I would prefer picking a solution that works most reliable.
Eg there might be restrictions on non-stock android phones (like EMUI huawei), which might restrict one or the other solution.
Think this is way more important than supporting legacy (android 7) devices.

@membersound this would use stock android API's if a non-stock phone decides to go against whats in the android docs there won't be much we can do for it. More than likely if other apps support it on your device then it should work here as the code would be similar. We wont really know until this is implemented and out in the beta how well it works on other devices.

Was this page helpful?
0 / 5 - 0 ratings