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!
Bluetooth/NFC toggle widget
Moderator: Martin
Re: Bluetooth/NFC toggle widget
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.....
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
Thank you for your tip!