Silent Mode to deactivate profile

17 views
Skip to first unread message

Reginald Booker

unread,
Mar 27, 2015, 3:23:28 PM3/27/15
to tas...@googlegroups.com
I'm trying to use the Silent Mode variable to condition a profile to not activate when the phone is in silent mode. The silent mode condition would be the third condition required for profile activation. The profile should work as follows: "When the screen is on" AND "When a separate profile is off" AND "The phone is not in silent mode" then the notification volume is set to 0 and the ringer volume is left at its current value. Can anyone help me out with this?


Robert Ryan

unread,
Mar 27, 2015, 4:02:17 PM3/27/15
to tas...@googlegroups.com
You need to add Variable Value context that checks for %SILENT ~ off

Marta Hintz

unread,
Mar 27, 2015, 4:07:10 PM3/27/15
to tas...@googlegroups.com
You could try something like this

Profile: Testy 1 (375)
State: Profile Active [ Name:Active Profile ]
State: Display State [ Is:On ]
State: Variable Value [ %SILENT ~ off ]
Enter: Testy 1 (338)
A1: System Volume [ Level:5 Display:Off Sound:Off ]

Reginald Booker

unread,
Mar 27, 2015, 4:32:21 PM3/27/15
to tas...@googlegroups.com
Those states are almost exactly what I'm trying to use. It's almost like the variable value condition is never read.

Reginald Booker

unread,
Mar 27, 2015, 4:32:53 PM3/27/15
to tas...@googlegroups.com
I've tried that and it won't pick up that the variable is active.

Marta Hintz

unread,
Mar 27, 2015, 4:43:41 PM3/27/15
to tas...@googlegroups.com
Try a test task that just flashes silence variable and see what you get.

Robert Ryan

unread,
Mar 27, 2015, 4:55:27 PM3/27/15
to tas...@googlegroups.com


On March 27, 2015 2:32:53 PM MDT, Reginald Booker <reginal...@gmail.com> wrote:
>I've tried that and it won't pick up that the variable is active.

That's odd, I use that context in one of my profiles and have no problem.

What version of the Android OS are you using?

Could you export and post the task description?

What does the run log show?

Reginald Booker

unread,
Mar 27, 2015, 5:01:58 PM3/27/15
to tas...@googlegroups.com
Tried the test task when I first experienced the issue. The system is picking up the variable.

Reginald Booker

unread,
Mar 27, 2015, 5:05:59 PM3/27/15
to tas...@googlegroups.com
I'm using Android 4.4.4 and just attached the xml. The run log show's that the profile is running like it would if the silent mode condition wasn't in place.
Display_On_Ringer.prf[1].xml

Robert Ryan

unread,
Mar 27, 2015, 5:33:54 PM3/27/15
to tas...@googlegroups.com
In the profile you attached, you are using the context: %SILENT ~ on. 

As stated previously, you should be using: %SILENT ~ off.
Screenshot_2015-03-27-15-29-38.png

Reginald Booker

unread,
Mar 27, 2015, 5:52:45 PM3/27/15
to tas...@googlegroups.com
I was using %SILENT ~ off before and nothing was happening. The profile finally goes inactive if I use %SILENT ~ on which it wasn't doing before so I guess that's good. Now if I put the phone into silent mode the profile runs and turns the volume back on. The log shows it just looping the profile over and over.

Robert Ryan

unread,
Mar 27, 2015, 6:46:57 PM3/27/15
to tas...@googlegroups.com
I have no problem with the enter task. The profile activates correctly.

The problem arises when you try to put the phone on silent. There are several actions in your exit task that set the ringer volume. Executing any of these actions will kick you out of silent mode. This causes the enter task to fire again.

On my device this seems to cause an infinite loop of the enter and exit tasks.

Reginald Booker

unread,
Mar 27, 2015, 11:05:25 PM3/27/15
to tas...@googlegroups.com
Yeah it started doing the same thing on my device. I tweaked the code a little bit and it suddenly started working. For now my fix seems to be working. Thanks for your help everyone.
Reply all
Reply to author
Forward
0 new messages