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

Tasker: Would like to detect whether or not I'm in a phone call

I would like to use the variable of being in a phone call, so that tasker will leave my bluetooth on when i unplug my headphone jack. I figure i can make an exit task to turn on bluetooth or call on another profile, but don't know how to set the context variable of being in a call. Thanks in advance for any help.
 
after a couple of weeks of testing I realized that Phone Idle never gets called. so bluetooth always stays on. Just wondering if anybody new when exactly phone idle gets called?

I haven't used Phone Idle since Incoming Call became available, but it worked the last time I used it. It should "activate" when the phone goes back on hook (call disconnects or you hangup without completing an outgoing call or answering an incoming call). I just did a quick test by creating the following profile:

Context: Phone Idle
Task:
Flash "Phone idle"

I then placed an outgoing call and aborted the call before it was answered and the message appeared right after I hung up.

Is it possible that something else isn't working that's making it appear as though Phone Idle isn't working? Have you tried using a Notify action as part of the task to provide some lasting evidence that the task actually executed?
 
  • Like
Reactions: sportsdude81
Upvote 0
I expect future versions of Tasker will have a better way of doing this, but here's how you can do it now:

Profile 1
Context: Phone Offhook
Task:
Variable Set %INCALL = 1

Profile 2
Context: Phone Idle
Task:
Variable Clear %INCALL

In another task or profile you can check to see if you're on a call by testing for %INCALL > 0.

If Phone Idle isn't working couldn't you clear %INCALL in Profile 1's exit action? I haven't tried this, just thinking about it.
 
Upvote 0
Haha I did that same test last night. I think it doesn't work because when a bluetooth device is paired with the phone the phone does not go Idle until the device is unconnected. If I disconnect the device it works but if the device is still connected it doesn't work.

So I can live with that. Thanks for the help
 
Upvote 0
Haha I did that same test last night. I think it doesn't work because when a bluetooth device is paired with the phone the phone does not go Idle until the device is unconnected. If I disconnect the device it works but if the device is still connected it doesn't work.

So I can live with that. Thanks for the help

Hmm... it never occurred to me to check that. Glad you figured it out.
 
Upvote 0
Apparently That wasn't the problem either because I did some tweaking and now it works flawlessly. Here are my profiles in case anybody is interested.

Profile: 1
Context: Phone Offhook
Variable: Variable Set %INCALL 1

Profile: 2
Context: Phone Idle
Variable: Variable Set %INCALL 0



I also put profile 2 in the profile I was using to start bluetooth. Just for good measure, and in the exit task of the profile turning on bluetooth I had these 2 profiles.

Profile: 1
Bluetooth set on
if %INCALL ~ 1

Profile: 2
Bluetooth set off
if %INCALL ~ 0

I know there are a couple of redundancies in there, but that is how I got it to work. Thought I should share.
 
  • Like
Reactions: BubbleSoap
Upvote 0

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones