Bluetooth/NFC toggle widget

Post your questions and help other users.

Moderator: Martin

Post Reply
thegag
Posts: 5
Joined: 23 May 2016 10:36

Bluetooth/NFC toggle widget

Post by thegag » 28 Feb 2017 15:55

Hello guys,

I have a simple question how to make a widget which simply turns Bluetooth or NFC on and off. In the actions I only found on OR off.
On klick it should turn on, on the next klick it should turn off BT/NFC.

Anybody can help?
Thanks in advance!

User avatar
Scotty
Posts: 78
Joined: 26 Aug 2016 20:29
Location: Southern California

Re: Bluetooth/NFC toggle widget

Post by Scotty » 28 Feb 2017 16:27

You use a condition to control the outcome of the flow.

Make a flow in which trigger is followed by the condition Bluetooth enabled. This condition will return TRUE if bluetooth is currently ON; and FALSE if bluetooth is currently OFF. So point the condition's TRUE output to an Action Set Bluetooth State, and tell that to turn bluetooth OFF (so if BT is ON, the flow will turn it OFF); and point the condition's FALSE output to another Set Bluetooth State action, this time setting it to turn bluetooth ON.

Each time the flow is run, BT will be toggled.....

thegag
Posts: 5
Joined: 23 May 2016 10:36

Re: Bluetooth/NFC toggle widget

Post by thegag » 28 Mar 2017 12:35

Thank you for your tip!

Post Reply