@android.support.annotation.RequiresPermission(android.permission.BLUETOOTH_ADMIN)

Here are the examples of the java api @android.support.annotation.RequiresPermission(android.permission.BLUETOOTH_ADMIN) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

18 Source : RxBleClient.java
with Apache License 2.0
from niqo01

@NonNull
@RequiresPermission("android.permission.BLUETOOTH_ADMIN")
public Observable<BleDevice> startBleScan(List<DataType> dataTypes, int timeoutSecs) {
    return ObservableTask.create(callback -> {
        BleScanCallback bleCallBack = new BleScanCallback() {

            @Override
            public void onDeviceFound(BleDevice bleDevice) {
                callback.onNext(bleDevice);
            }

            @Override
            public void onScanStopped() {
                callback.onComplete();
            }
        };
        callback.setDisposeListener(() -> client.stopBleScan(bleCallBack));
        return client.startBleScan(dataTypes, timeoutSecs, bleCallBack);
    });
}