This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

can not scan device

Hi, I'm using nRF52832 with sdk 13.1.0(softdevice 4.0.2). I had trouble to scan nRF52832 in android smart device.When i disconnect the device a long time when the status is lock screen,then the android device can not find the device(NRF52832).It also cannot find the other device.But I use the other android device to scan device is ok.Then i open the screen,everything will be ok.But i want to scan it when the status is lock screen.What should i do?

Parents
  • _ public void scanLeDeviceHuaWei(boolean enable) { if (!mBluetoothAdapter.isEnabled()) { return; } if (enable) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){ List ar = new ArrayList<>(); ar.add(scanFilterHuaWei); scannerHuaWei.startScan(ar,scanSettingsHuaWei,callbackHuaWei); } } else { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { scannerHuaWei.stopScan(callbackHuaWei); } } }

Reply
  • _ public void scanLeDeviceHuaWei(boolean enable) { if (!mBluetoothAdapter.isEnabled()) { return; } if (enable) { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP){ List ar = new ArrayList<>(); ar.add(scanFilterHuaWei); scannerHuaWei.startScan(ar,scanSettingsHuaWei,callbackHuaWei); } } else { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { scannerHuaWei.stopScan(callbackHuaWei); } } }

Children
No Data
Related