My goal is to find neighboring Bluetooth devices (LE and "Classic" devices) to associate existing visible neighboring devices with some of the features that my application does with it. (not a specific device / devices, but all of them !!!)
what i know:
startLeScan() will callback only with BLE devices- the two methods work differently - while startBLeScan () is controlled by my code with callbacks, while the classic scan is controlled by the system process and returns the
BluetoothDevice found through the broadcasts.
what i don't know for sure:
startScan() current API level of the device is 18+ startScan() , there will always be both available BLEs and classic devices.BluetoothDevice.connectGatt() a new BLE API has been added, but it should also work with classic bluetooth (return GATT services ...).
What I would like to know:
- if
startScan() really returns both types (classic and BLE), what is better to use in terms of battery consumption, performance, best practices and other aspects?
my application will periodically perform background scans, so I would like to minimize the impact of battery consumption.
android android bluetooth bluetooth-lowenergy
Tal kanel
source share