Detecting how BlueTooth is turned on

Post your questions and help other users.

Moderator: Martin

Post Reply
DataCrypt
Posts: 8
Joined: 21 Mar 2013 00:46

Detecting how BlueTooth is turned on

Post by DataCrypt » 18 Sep 2013 05:42

Hello. I have a flow that I created to turn bluetooth on/off depending on location or time. There are times though that I want to manually turn bluetooth off (or on) and don't want this flow to switch it on me again. I've tried setting a global variable to know when the flow has turned bluetooth on or off, but how can I detect when it's done manually via the phone settings to prevent this flow from running (i.e. use this global variable somehow). For some reason the logic is confusing me. Any ideas, suggestions, or examples would be greatly appreciated. Thank you for your time!

Kindest Regards,
DataCrypt

bobchernow
Posts: 56
Joined: 16 Mar 2013 14:10

Re: Detecting how BlueTooth is turned on

Post by bobchernow » 18 Sep 2013 12:49

Create a flow that triggers on Bluetooth on or off. Have it check the value of a global you create (global_was_set_by_flow) in your automatic flow. If that is set, ignore the change. If not set then it is manual so either disable the auto flow or set another variable to tell the auto flow to do nothing.

DataCrypt
Posts: 8
Joined: 21 Mar 2013 00:46

Re: Detecting how BlueTooth is turned on

Post by DataCrypt » 19 Sep 2013 02:44

@bobchernow - Thank you! I had a manual flow trigger setup already, but was trying to mess with the variable(s) to prohibit the other flow, but the simple idea of disabling the flow worked perfect! :D

Best Regards,
DataCrypt

Post Reply