BLE scan is not working for BlackBerry keyone

Viewed 274

I am using My BLEScan(without scan filter) in separate service for my android application.

  mLeScanner.startScan(mScanCallback);

The same code is working in all another device like(Samsung,LG,MOTO,MI,pixel)

But I tried same code in Blackberry key one (Android 7.1.1), in that app is crashing.

I have also added the condion when scan failed callback called, that time it will stop the scan and start again.

Note: location and admin permission also added.

Crash logs:

Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'boolean java.util.List.equals(java.lang.Object)' on a null object reference
    at android.bluetooth.le.BluetoothLeScanner$BleScanCallbackWrapper.resumeScans(BluetoothLeScanner.java:464)
    at android.bluetooth.le.BluetoothLeScanner.startScan(BluetoothLeScanner.java:178)
    at android.bluetooth.le.BluetoothLeScanner.startScan(BluetoothLeScanner.java:118)
    at android.bluetooth.le.BluetoothLeScanner.startScan(BluetoothLeScanner.java:98)

Is anyone having idea any things I need to do separately getting start the scanning?

Thanks

0 Answers
Related