14

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?

Chase Florell
  • 567
  • 3
  • 5
  • 15
  • 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 03:28
  • Yuck sure -- why didn't I think about those!?! I even use them myself... – Izzy Jan 18 '13 at 07:00

1 Answers1

13

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.

TomG
  • 3,739
  • 4
  • 30
  • 42
  • 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 03: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 03:05
  • Here's what it will look like in your tasker profile when set up properly: https://goo.gl/cAMY4T (i added this to the answer) – Justin Maxwell Feb 18 '16 at 17:19