Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to run a task every time my phone loses connection to my truck's bluetooth device.

I can see a way to run a task when it connects, and obviously I can "invert" it, but inverting it doesn't sound right to me.

What is the right way to run a task upon BT connection loss to a specific device?

share|improve this question
That's obviously the only choice you've got. I'd introduce a variable to it: BT Connected -> %MYVAR = 1. Then combine: !BT-Connected & Isset %MYVAR => just lost connection; unset %MYVAR. !BT-Connected & !Isse %MYVAR would be "lost it a while before". Just to give you a pattern to play with :) – Izzy Jan 17 '13 at 23:05
I was looking for "Exit Tasks" – Chase Florell Jan 18 '13 at 3:28
Yuck sure -- why didn't I think about those!?! I even use them myself... – Izzy Jan 18 '13 at 7:00
up vote 7 down vote accepted

Create a profile that is active when connected to the Bluetooth device and set up an exit task to run whatever you want when the profile becomes inactive due to the device disconnects.

share|improve this answer
Ah, I see where that is now. You can create an "Exit Task" from the profiles screen... I didn't see how to do that before. Thanks – Chase Florell Jan 18 '13 at 3:03
So when I connect to that specific Bluetooth device, I clear my %PARKINGLOCATION variable, and when the profile EXITS, then I set the %PARKINGLOCATION to %LOC, which sets the lat/long of the current location. – Chase Florell Jan 18 '13 at 3:05
Here's what it will look like in your tasker profile when set up properly: (i added this to the answer) – Justin Maxwell Feb 18 at 17:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.