I have recently picked up a pair of Bluetooth Headphones which I use while at work. When I'm at work I sometimes switch from listening to my computer to listening to my phone. Since there is no easy way to connect to my headphones with one click (you have to go to Settings -> Bluetooth -> Tap on your device), I've decided to create next best thing: Tasker Profile!
What this profile does is displays a permanent notification with 2 buttons: Toggle Bluetooth connection to a device of my choice and dismissing this permanent notification. The setup this up, followed profile and task description exports!
State: BT Near [ Name:BT Headphones Address:11:22:33:44:55:66 Major Device Class:Any Standard Devices:On Low-Energy (LE) Devices:Off Unpaired Devices:Off Toggle BlueTooth:Off ] Enter: Anon (87) A1: Notify [ Title:Parrot Zik Text: Icon:hd_hardware_headphones Number:0 Permanent:On Priority:3 Actions:(2) ] Exit: Anon (88) A1: Notify Cancel [ Title:Parrot Zik Warn Not Exist:Off ]
Please note that Enter task A1 has 2 actions:
- Perform Task action which calls a task that is described in the next description block
- Notify Cancel action which dismisses the permanent notification
Toggle Headphones Connection Task Description:
A1: Status Bar [ Set:Collapsed ] <if not connected to Zik, connect> A2: If [ %zikActive ! Set ] <connect to Zik> A3: Secure Settings [ Configuration:BT Headphones - Connect/Auto BT Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds):0 ] A4: Media Volume [ Level:15 Display:Off Sound:Off ] A5: Variable Set [ Name:%zikActive To:1 Do Maths:Off Append:Off ] A6: Else A7: Secure Settings [ Configuration:BT Headphones - Disconnect/Auto BT Package:com.intangibleobject.securesettings.plugin Name:Secure Settings Timeout (Seconds):0 ] A8: Media Volume [ Level:0 Display:Off Sound:Off ] A9: Variable Clear [ Name:%zikActive Pattern Matching:Off ] A10: End If
|Root Access||Secure Settings|