Difference between Tasker event BT connected / disconnected and intent android.bluetooth.device.action.ACL_CONNECTED / DISCONNECTED

1,711 views
Skip to first unread message

Richard Wallace

unread,
Dec 18, 2015, 5:22:15 AM12/18/15
to Tasker
Having worked on some BT profiles of late for car modes etc I am wondering what the difference between the 2 contexts are?
 
- taskers context State > BT Connected 
- intent received > android.bluetooth.device.action.ACL_CONNECTED
 
I currently use the State BT connected, but am seeing more an more people using the intent received method.
 
What is the reason for this.
As I see it, using the intent received you need 2 profiles where 1 can be used. (intent received is an event and so no exit task is possible)
 
I have a 'BT manager' task that is triggered on BT connection and disconnection, which fills a variable with the name of the BT device(s) connected (java), and clears the variable when disconnected. It will also the automatically disable Bluetooth is no connection is re-established after a define amount of time.
 
Doing some tests using the state BT Connected works perfectly.
 
Just wondering why people are using the intent received for detecting BT connection.

Dennis A.

unread,
Dec 18, 2015, 8:21:04 AM12/18/15
to Tasker
I'm probably doing something wrong...
.. but the "intent" method always triggers whether I turn my headset on OR off (phone BT "on" of course).

But, using the "BT connected" method, if I turn a connected headset off, the context never triggers..
.. again, I'm probably doing something wrong?

Question:
Using the BT connected method, is there a way to detect if I turn just my headset off .. and then back on again?
(context triggers twice)

Dennis

Richard Wallace

unread,
Dec 18, 2015, 8:22:01 AM12/18/15
to Tasker
Sorry not sure on this.
But the intent method only fires once the BT device is connected for me

Dennis A.

unread,
Dec 18, 2015, 8:37:26 AM12/18/15
to Tasker
It also fires on the initial connection.
But I need to know when the device disconnects too.
BT CONNECTED does not show that.

I have a BT ESCORT RADAR device that periodically just drops the connection.. I need to detect when that occurs so I can trigger a task to reconnect it.. the app that it connects to never reconnects on its own, so I have to "help" it.

Also, sometimes Pandora just goes away.
In that case, I just turn my headset off and then back on (motorcycle helmet) and the "helmet BT disconnected" context triggers a task to kill Pandora and then restart it..
...much easier than fiddling with the phone while I'm riding..
...it's in the trunk anyway so I'm not tempted to touch it in the first place.

I just can't do all that using BT CONNECTED..
..or maybe I just don't know how?

Dennis

Brad Minion

unread,
Dec 18, 2015, 8:45:10 AM12/18/15
to tas...@googlegroups.com
If you have a profile that fires on BT connected the enter task will execute when it connects. Then when BT disconnects the exit task will run. I have a bunch of profiles like that.

--
You received this message because you are subscribed to the Google Groups "Tasker" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tasker+un...@googlegroups.com.
Visit this group at https://groups.google.com/group/tasker.
For more options, visit https://groups.google.com/d/optout.

Dennis A.

unread,
Dec 18, 2015, 9:04:05 AM12/18/15
to Tasker
I'll give that a try..

Thanks,
Dennis

Reply all
Reply to author
Forward
0 new messages