@SuppressLint("MissingPermission") // We check before this is called
    public void close() {
        if (mBluetoothGatt == null) {
            return;
        }
        mBluetoothGatt.close();
        mBluetoothGatt = null;
    }
After using a given BLE device, the app must call this method to ensure resources are
released properly.
sample_app/src/main/java/uk/co/alt236/btlescan/services/BluetoothLeService.java