I want use bluetooth low energy (BLE).
In
API
startlescan()
startscan()
if(api < 21) startlescan();
if(api >= 21) startscan();
You can use below code:-
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
startlescan();
}
else{
startscan();
}