Bluetooth Devices Connected
Posted: 12 May 2016 21:46
I'd like to have a flow that enables Bluetooth, and then disables it after ten minutes if nothing is connected. The idea is that if I leave home or work, I'm probably getting into my car, which has Bluetooth, but I might be going for a walk instead.
I had a flow that would enable Bluetooth, sleep for 10 minutes (without keeping the phone awake), check to see if devices were connected, and then disconnect if none were. Unfortunately, this would give me 10 minutes of being connected to my car, and then turn Bluetooth off.
I tried again with a flow that would enable Bluetooth, sleep for 10 minutes, then call another flow that checked to see if anything was connected and disconnect if nothing was. This seemed to work, but this morning it again disconnected me after 10 minutes. When I checked the log, it said that the Bluetooth devices connected condition evaluated to false.
The documentation for the condition says that the function is not directly supported by Android, and that Automagic has to keep track of connect and disconnect events. I suppose that it could be losing a connect event somewhere along the line.
Is there a better way that I should be doing this?
I had a flow that would enable Bluetooth, sleep for 10 minutes (without keeping the phone awake), check to see if devices were connected, and then disconnect if none were. Unfortunately, this would give me 10 minutes of being connected to my car, and then turn Bluetooth off.
I tried again with a flow that would enable Bluetooth, sleep for 10 minutes, then call another flow that checked to see if anything was connected and disconnect if nothing was. This seemed to work, but this morning it again disconnected me after 10 minutes. When I checked the log, it said that the Bluetooth devices connected condition evaluated to false.
The documentation for the condition says that the function is not directly supported by Android, and that Automagic has to keep track of connect and disconnect events. I suppose that it could be losing a connect event somewhere along the line.
Is there a better way that I should be doing this?