#Ringer Mode can't be changed by HA App unless Home Assistant Windows is open?

1 messages · Page 1 of 1 (latest)

fast elm
#

Haiyo! I wanna ask lately I'm having a issue where the ringer mode can't seems to be charged by the app unless HA Windows is Actively open, anyone have idea what would be the cause?

#
actions:
  - action: notify.mobile_app_lunar_6_pro
    data:
      message: command_ringer_mode
      data:
        command: vibrate
#

This is the yaml used to change phone to vibrate

#

It's already set to have unrestriced background usage

#

And I don't believe it's anything to do with that as I can just go back to desktop and it will stop working almost instantly like it just lost it's permission completely

#

As For Android Version, it's currently running Android 17 on a Pixel 6 Pro

#

Could very well be a support problem with Android 17?

#

I did set it up quite recently so can't really tell for sure, but I do recall it used to work just fine

#

Did some digging apparently there is charges in Android 17 that will effect Ringer Mode and Volume change

#

What is Changing in Android 17?
Background Audio Hardening: Starting in Android 17, the Android audio framework enforces strict new restrictions on background audio interactions. This includes audio playback, audio focus requests, and volume change APIs.

Silent Failures: If an app tries to change the volume or audio state while in the background (without a properly initiated "While-In-Use" foreground service), the system will block the action. Instead of crashing or showing an error, the command will simply fail silently.

Strict "While-In-Use" (WIU) Requirements: To interact with audio APIs, a foreground service must now be started while the app is visible to the user. A service kicked off entirely in the background—such as receiving a push notification from your HA server—will not automatically get the necessary access to change audio states.