• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Variable Help

Johnaval

Lurker
Hey guys, here is the deal, I created two profiles so that when I turned my phone face down when a Call is Incoming it would turn silent mode on and when it turns face up the silent mode turns off. I did it like this:

Profile Face Up:

Conditions:
State Call Incoming + State Orientation Face Up

Enter:
Variable Set %SCRDOWN ~ 0

Exit:
Variable Set %SCRDOWN ~ 1

Profile Face Down:

Conditions:
State Call Incoming + State Orientation Face Down

Enter:
If %SCRDOWN ~ 1:
Silent mode:on
End If

Exit:
Variable Set %SCRDOWN ~ 0

When I'm receiving a call it works perfectly but the problem is when the call is over or I stop receiving it, the variable %SCRDOWN value continues being 1 instead of 0, so if my phone is already facing down when I receive a call, it won't play the ringtone, the silent mode will be turned on. It is like the Profile Face Down is not doing the Exit. Does anyone knows how to help me?
Thank you.
 
FIXED!
I realized that when the call ended, the Profile Face Up would execute the Exit Task and turn the %SCRDOWN value to 1.
I fixed creating a new profile with the condition Not Incoming Call and execute the Variable Set %SCRDOWN ~ 0.
 
Glad we could help :D

Hope you'll stick around for a bit - it's always fun to have extra Tasker hackers. :thumbup:
 
Back
Top Bottom