C-Command Software Forum

Handling Bluetooth off

Currently ToothFairy does not notify me that Bluetooth is turned off. It would be nice if (a) the menu bar icon indicated in some way that Bluetooth was off, and (b) it would prompt me to turn on Bluetooth if it is currently off.

Currently, ToothFairy should suggest turning Bluetooth on if connecting fails because it was off. I’d like to be able to have ToothFairy offer to turn it on for you, but as far as I know there’s no public API for that, and so it would not be possible in the App Store. Would you want it to open System Preferences for you?

I believe it is possible to read the Bluetooth status, though. I think maybe ToothFairy should dim the menu bar icons if Bluetooth is off.

Hmm, good point regarding setting the power state not being available in the App Store. I do believe you should be able to tell whether Bluetooth is on or off though. How about having a script hook for when Bluetooth is off, and if no script is selected it’ll open System Preferences?

That makes sense. I think it would be straightforward to have a little Python script that calls IOBluetoothPreferenceSetControllerPowerState().