Reader request: A smarter flip-to-mute feature in Tasker

Over the weekend I got an email from a reader, Kapil, regarding a problem he has in Tasker. One of the most common Tasker profiles out there is to have it mute the ringer when the phone is flipped with the screen facing down, but he wanted a more intelligent version that would allow the phone to already be facing down when the phone came in, without muting it until he’d had a chance to pick it up, look at the screen, and the put it with the screen facing down again.

I tried a few different ways of doing this, and came up with one that’s fairly simply- although it does require three individual profiles.

Profile 1:
1: Call, Type: Incoming
2: Orientation, Face Down, inverted
A1: Variable Set %Callorientation To 1


Profile 2:
1: Variable Value, %Callorientation Matches 1
2: Call, Type: Incoming
3: Orientation, Face Down
A1: Silence Ringer


Profile 3:
1: Phone Idle (Event context)
A1: Variable Set %Callorientation To 0


Combined, these three profiles make it so that the orientation-based silencing profile only triggers if the screen has been facing any direction but face down earlier in that call. In other words, if the phone is not facing down when the call comes in, flipping it that way will mute it, but if it is facing down, it needs to be flipped first in order for that option to be available.

This is done with the use of the %Callocation variable. This variable is set to 1 when the phone is ringing and the phone is not facing down. Note the difference between an inverted Face Down context and a Face Up context; the latter only requires that the phone isn’t facing down, instead of requiring it to face another specific direction. When that variable is set, the mute profile will be able to trigger, using a standard combination of incoming call and orientation variables. If the phone is facing down when the call comes in, the variable won’t be set, and thus it won’t trigger the profile until the phone is first flipped, triggering the profile to set the variable.

The final profile is there to reset the variable when the phone becomes “idle”, meaning the call ended in some way. That ensures that it won’t stop working after the first call.

The video below shows this working on my Galaxy S II. Silence Ringer isn’t available on my device, so I used End Call instead for this demonstration. You might have to disable the restore settings option for the profile to prevent the ringer from turning back on if you flip the phone again while it’s ringing, but I have no way of checking if that’s necessary.

Do note that this setup uses several Tasker options which are known to not be available or work properly on all devices, like I talk about here. This is intended as a modification to a common Tasker profile for those who have a device where all the necessary features are supported. If it doesn’t work for you personally, there’s literally nothing I can do about it, as it’s then device/ROM-related.

tasker banner - for some reason we don't have an alt tag here

Pocketables does not accept targeted advertising, phony guest posts, paid reviews, etc. Help us keep this way with support on Patreon!
Become a patron at Patreon!

Andreas Ødegård

Andreas Ødegård is more interested in aftermarket (and user created) software and hardware than chasing the latest gadgets. His day job as a teacher keeps him interested in education tech and takes up most of his time.

Avatar of Andreas Ødegård

6 thoughts on “Reader request: A smarter flip-to-mute feature in Tasker

  • In between the lines there’s a lot of obscurity. I’m not inclined to resign to maturity…

  • I believe the correct variable for profile 3 should be %Callorientation.

    Also, if Silence Ringer isn’t supported by your device and you instead use End Call, while the results appear to be the same, the real difference is that the call will never go to voicemail. You have effectively answered the call and then disconnected VERY quickly.

    I would suggest that the task for profile 2 would be better served if you instead set Ringer Volume to level 0 and Vibrate On Ringer set to Off. You can further add an ‘If’ to each that %Callorientation = 1 if you want to be REALLY sure about it. When this task completes, your Ringer Volume and Vibrate on Ringer should be reset to their previous values.

    • Avatar of Andreas Ødegård

      You’re absolutely right, thanks for spotting that typo!

      As for End Call, I wasn’t suggesting that be used or anything- I simply used it in the video since it’s very easy to see that the profile only triggers when it should then :)

  • Avatar of amir

    I have a Huawei G510 android 4.1.1 and i create a simple profile with tasker 4.1u3 like below:
    Profile : Orientation Face down + incoming call,*
    Task : Silent mode, on

    when there is an incoming call, it is just ringing for one second, then mute icon appears on the phone and it mutes the phone successfully.
    when i face up the phone, mute icon disappears but there is no ringing.
    i was confused about it.

  • but how can i put “1: Call, Type: Incoming 2: Orientation, Face Down, inverted” in the same profile? Tasker just allow one, how can i make it?

  • Avatar of George

    Great article. It didn’t quite work the way I wanted but it really helped me figure out how to use Tasker.

    For anyone new to Tasker, you can long press on a context to add another context.

    This method will switch the ringer back on once you flip the phone so it’s facing up. I want it to remain muted until the call ends. To achieve this do the following:

    Under profile 2 add a second variable e.g. %RINGERSILENCED and set it to 1.

    Under profile 1 add an if statement and check if %RINGERSILENCED is set to 1. If so, mute the phone.

    Under profile 3 set %RINGERSILENCED to 0.

    Now the call will remain muted once flipped onto its face and will only un-mute after the call ends and the phone goes into its idle state.


Leave a Reply

Your email address will not be published. Required fields are marked *