When I use the action "Set Audio Volume" to set the ringer volume to 0 I would expect that afterwards the action "Init variable system setting" (name=volume_ring) would return 0.
The status bar indicates that the volume is indeed muted. However, on my phone (Nexus 4, KitKat 4.4.2) this action always returns the value 5.
So what are those values?
Volume values from "Init variable system setting"?
Moderator: Martin
Re: Volume values from "Init variable system setting"?
I do not know the technical details behind this, but ringer mode and ringer volume are independent from each others. It seems that phone stores the silent status to ringer but not in volume level variable.
As I said I don't have any knowledge to back this up but I've made a little empirical study:
1. set ringer volume to max
-> set ringer mode to silent or vibrate from status bar
-> press volume up in home screen
-> your ringer volume is back to max
2. Set your ringer mode to normal
-> press volume down until the ringer mode turns to silent/vibrate
-> press volume up ONCE
-> ringer mode is back to normal and volume is on level 1
Conclusion: silent volume level gets stored only in variables handling ringer mode but not to volume level variables.
As I said I don't have any knowledge to back this up but I've made a little empirical study:
1. set ringer volume to max
-> set ringer mode to silent or vibrate from status bar
-> press volume up in home screen
-> your ringer volume is back to max
2. Set your ringer mode to normal
-> press volume down until the ringer mode turns to silent/vibrate
-> press volume up ONCE
-> ringer mode is back to normal and volume is on level 1
Conclusion: silent volume level gets stored only in variables handling ringer mode but not to volume level variables.
Re: Volume values from "Init variable system setting"?
Yes, I noted the same behaviour.MURTUMA wrote: Conclusion: silent volume level gets stored only in variables handling ringer mode but not to volume level variables.
But that's not the problem, maybe my example was bad.
If I set the ring level to 1 (and ringer mode to "normal") I would expect that "Init variable system setting" (name=volume_ring) would also return 1. But it always returns 5, so that I can't get the current ring level only.
However, if I use the action "Store Audio Volumes" the global variable "global_volume_ring" does contain 1. But this "trashes" these global variables which might have been saved for other purposes...
Re: Volume values from "Init variable system setting"?
Android itself uses global_volume_x variables, not volume_x variables which are local. You may have set the local variable to 5 yourself. Depending on what you're trying to achieve, you should maybe store the global variable to another variable in another flow, so you don't mess the original up.