Page 1 of 1

Bluetooth/NFC toggle widget

Posted: 28 Feb 2017 15:55
by thegag
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!

Re: Bluetooth/NFC toggle widget

Posted: 28 Feb 2017 16:27
by Scotty
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.....

Re: Bluetooth/NFC toggle widget

Posted: 28 Mar 2017 12:35
by thegag
Thank you for your tip!