Right now I am working on BLE.I found one issue that it's showing me log of startLeScan(): null
and scanning also not working I try everything for that and also search about startLeScan(): null
but didn't get any solution yet.
Here is my code for BLE connection :
private void scanLeDevice(boolean enable) {
if (enable) {
mBluetoothAdapter.startLeScan(mLeScanCallback);
} else {
mBluetoothAdapter.stopLeScan(mLeScanCallback);
}
}
And Here is my Log at which i found this thing
01-27 13:12:21.357 4657-4657/com.icuisine D/BluetoothAdapter: stopLeScan()
01-27 13:12:23.003 4657-4657/com.icuisine D/BluetoothAdapter: startLeScan(): null
01-27 13:12:23.004 4657-4657/com.icuisine D/BluetoothAdapter: STATE_ON
01-27 13:12:23.007 4657-4668/com.icuisine D/BluetoothLeScanner: onClientRegistered() - status=0 clientIf=5
I go though with lots of websites and found that lesson is now deprecated but don't know how can I get alternate way to do scanning.
I am testing in Nexus 5 Ver Android 6.1 and Also Apply runtime permission for Bluetooth.
I know this is Duplicate question but I didn't found any solution in original one that's why i repost it!
Hope this will be sufficient details. Need Help to do this thing.
Thanks in advance.