// Path: app/src/main/java/com/dataart/btle_android/helpers/ble/base/BleScanner.java
// public abstract class BleScanner {
//     protected final ScanCallback scanCallback;
//     protected final BluetoothAdapter bluetoothAdapter;
// 
//     public BleScanner(ScanCallback scanCallback, BluetoothAdapter bluetoothAdapter) {
//         this.scanCallback = scanCallback;
//         this.bluetoothAdapter = bluetoothAdapter;
//     }
// 
//     public abstract void startScan();
// 
//     public abstract void stopScan();
// 
//     public interface ScanCallback {
//         void onDeviceFound(BluetoothDevice device, int rssi, byte[] scanRecord);
//     }
// }


import android.bluetooth.BluetoothAdapter;
import com.dataart.btle_android.helpers.ble.base.BleScanner;
package com.dataart.btle_android.helpers.ble.scanners;




/**
 * Created by Constantine Mars on 6/13/16.
 * Scanner for Android Jelly Bean
 */

@SuppressWarnings("deprecation")
public class BleScannerJ extends BleScanner {

    private final BluetoothAdapter.LeScanCallback callback;

    public BleScannerJ(ScanCallback scanCallback, BluetoothAdapter bluetoothAdapter) {
        super(scanCallback, bluetoothAdapter);
        callback = scanCallback::onDeviceFound;
    }

    @Override
    public void startScan() {
        bluetoothAdapter.startLeScan(callback);
    }

// Path: app/src/main/java/com/dataart/btle_android/helpers/ble/base/BleScanner.java
// public abstract class BleScanner {
//     protected final ScanCallback scanCallback;
//     protected final BluetoothAdapter bluetoothAdapter;
// 
//     public BleScanner(ScanCallback scanCallback, BluetoothAdapter bluetoothAdapter) {
//         this.scanCallback = scanCallback;
//         this.bluetoothAdapter = bluetoothAdapter;
//     }
// 
//     public abstract void startScan();
// 
//     public abstract void stopScan();
// 
//     public interface ScanCallback {
//         void onDeviceFound(BluetoothDevice device, int rssi, byte[] scanRecord);
//     }
// }


// Path: app/src/main/java/com/dataart/btle_android/helpers/ble/scanners/BleScannerJ.java
import android.bluetooth.BluetoothAdapter;
import com.dataart.btle_android.helpers.ble.base.BleScanner;

package com.dataart.btle_android.helpers.ble.scanners;




/**
 * Created by Constantine Mars on 6/13/16.
 * Scanner for Android Jelly Bean
 */

@SuppressWarnings("deprecation")
public class BleScannerJ extends BleScanner {

    private final BluetoothAdapter.LeScanCallback callback;

    public BleScannerJ(ScanCallback scanCallback, BluetoothAdapter bluetoothAdapter) {
        super(scanCallback, bluetoothAdapter);
        callback = scanCallback::onDeviceFound;
    }

    @Override
    public void startScan() {
        bluetoothAdapter.startLeScan(callback);
    }

    @Override