I have TextViews that display the information of iBeacon (e.g. uuid, major, minor, etc.) and a Detect/Stop button to start/stop scanning BLE. When I press the button to start scanning while the iBeacon is turned off, the app displays nothing as expected. However, when I start scanning when the iBeacon is turned on, and then I turn off the iBeacon while scanning, the app still displays the information as if it is still detecting the iBeacon. When the app scans BLE while the beacon is turned on, it gives
D/BluetoothAdapter: onScanResult() - Device=(my device number) RSSI=-49
in the Logcat. When I turn off the beacon while scanning, it gives
D/BluetoothAdapter: startLeScan(): null
and
D/BluetoothAdapter: onClientRegistered() - status=0 clientIf=4.
Is there any way I can detect if iBeacon is turned off using LeScanCallback or anything? I have tried to learn how to do it from Android iBeacon Library, but I still don't know.
Thanks in advance.