0

I am developing an application in Android GATT BLE , I can get connection with my target device in Motorola devices only (Tested with Android version 5, 5.0.1,5.0.2) but, other devices like samsung,HTC, Lenovo etc, not working. I tried to debug the same, I could understand that mBluetoothAdapter.startLeScan(mLeScanCallback); the search is not working. How can I search and connect with the target by using other than motorola.

private void scanLeDevice(final boolean enable) {
        if (enable) {
            // Stops scanning after a pre-defined scan period.
            mHandler.postDelayed(new Runnable() {
                @Override
                public void run() {
                    mScanning = false;
                    mBluetoothAdapter.stopLeScan(mLeScanCallback);
                }
            }, SCAN_PERIOD);

            mScanning = true;
            mBluetoothAdapter.startLeScan(mLeScanCallback);
        } else {
            mScanning = false;
            mBluetoothAdapter.stopLeScan(mLeScanCallback);
        }
        ...
    }
Vineesh TP
  • 7,755
  • 12
  • 66
  • 130

0 Answers0