hi
my native language is German. sorry for my English.
how can I set a variable (1) if the blockmode goes active?
best regards
blockmode variable
Moderator: Martin
Re: blockmode variable
Hi,
Do you mean the Samsung specific blocking mode?
You could use a trigger System Setting Changed: System dormant_switch_onoff (should be available for the S3 and also the S5 but might have been named differently on other Samsung devices). The trigger makes the value available in variable setting. You could assign the value to your own global variable.
For example like this:
-trigger System Setting Changed: System dormant_switch_onoff
-action Script: global_blocking_mode = setting;
The value of the variable will be 0 for off resp. 1 for on.
You could also use an action Init Variable System Setting: System dormant_switch_onoff to blocking_mode to access the current value of Androids system settings database at the time when you want to use the value.
Regards,
Martin
Do you mean the Samsung specific blocking mode?
You could use a trigger System Setting Changed: System dormant_switch_onoff (should be available for the S3 and also the S5 but might have been named differently on other Samsung devices). The trigger makes the value available in variable setting. You could assign the value to your own global variable.
For example like this:
-trigger System Setting Changed: System dormant_switch_onoff
-action Script: global_blocking_mode = setting;
The value of the variable will be 0 for off resp. 1 for on.
You could also use an action Init Variable System Setting: System dormant_switch_onoff to blocking_mode to access the current value of Androids system settings database at the time when you want to use the value.
Regards,
Martin
Re: blockmode variable
no, I mean the "ruhemodus", it means quiet hours. it was my fault. I use a nexus5.
I found a value called quiet_hours_active
I don't know how I can use this to set a global variable.
what I want to do: in a flow I want to set the variable global_qh to 1 if the quiet hours goes active and set it to 0 If it goes inactive.
in an another flow I need the variable as condition. but I don't I how I can use this. I tried to set this globalvariable manualy.
I found a value called quiet_hours_active
I don't know how I can use this to set a global variable.
what I want to do: in a flow I want to set the variable global_qh to 1 if the quiet hours goes active and set it to 0 If it goes inactive.
in an another flow I need the variable as condition. but I don't I how I can use this. I tried to set this globalvariable manualy.
Re: blockmode variable
What kind of ROM are you using? I did not find this setting on my Nexus 5 (stock Android).
You can use almost the same flow to set a global variable to 0 or 1:
-trigger System Setting Changed: System quiet_hours_active
-action Script: global_ruhemodus = setting;
The trigger System Setting Changed executes the flow whenever it detects a change in the system database. The trigger also provides a variable setting that contains the current value which is usually a 0 when a setting is turned off or a 1 when the setting is turned on. Please also check out the documentation provided for each trigger by pressing the [?]-button when you are editing a trigger. The help lists all variables that a trigger provides to the flow.
You can also add a condition Debug Dialog to show a dialog that contains all global and local variables including the value of each variable at the time when the dialog-condition is executed.
You can use almost the same flow to set a global variable to 0 or 1:
-trigger System Setting Changed: System quiet_hours_active
-action Script: global_ruhemodus = setting;
The trigger System Setting Changed executes the flow whenever it detects a change in the system database. The trigger also provides a variable setting that contains the current value which is usually a 0 when a setting is turned off or a 1 when the setting is turned on. Please also check out the documentation provided for each trigger by pressing the [?]-button when you are editing a trigger. The help lists all variables that a trigger provides to the flow.
You can also add a condition Debug Dialog to show a dialog that contains all global and local variables including the value of each variable at the time when the dialog-condition is executed.
Re: blockmode variable
iam using omnirom.
sorry, I don't understand your post. maybe a user can translate it into German.
sorry, I don't understand your post. maybe a user can translate it into German.
Re: blockmode variable
it works now. thanks for your help.
but what I don't understand the debug part anyway.
but what I don't understand the debug part anyway.