How to know if the bluetooth adapter is enabled

Hello!
Since Bluetooth does not have a ScanStopped event (or something similar), I have to track the status of the scan through a timer (I need the scan to be done automatically all the time). The timer checks the status every second and if the scan does not occur, starts it. But a problem arises - if the bluetooth adapter on the phone is turned off - the timer every second displays a new request to turn on the adapter, not limited to one request. I tried to stop the timer when it fired and start it again after starting the scan, but that didn't help. How can I determine if the adapter is turned on or in some other way you can make a permanent automatic scan even if the user turns off the adapter manually (I have to turn it off myself, because after 10-15 connections it freezes on my Asus ZenFone)

This extension contains the IsEnabled block.

1 Like

thank you very much!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.