本文整理汇总了Java中no.nordicsemi.android.support.v18.scanner.BluetoothLeScannerCompat.stopScan方法的典型用法代码示例。如果您正苦于以下问题:Java BluetoothLeScannerCompat.stopScan方法的具体用法?Java BluetoothLeScannerCompat.stopScan怎么用?Java BluetoothLeScannerCompat.stopScan使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类no.nordicsemi.android.support.v18.scanner.BluetoothLeScannerCompat
的用法示例。
在下文中一共展示了BluetoothLeScannerCompat.stopScan方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: stopLeScan
import no.nordicsemi.android.support.v18.scanner.BluetoothLeScannerCompat; //导入方法依赖的package包/类
public void stopLeScan() {
if (!mScanning)
return;
final BluetoothLeScannerCompat scanner = BluetoothLeScannerCompat.getScanner();
scanner.stopScan(mScanCallback);
mHandler.removeCallbacks(mStopScanTask);
mScanning = false;
notifyItemChanged(mDevices.size());
}
示例2: stopScan
import no.nordicsemi.android.support.v18.scanner.BluetoothLeScannerCompat; //导入方法依赖的package包/类
/**
* Stop scan if user tap Cancel button
*/
private void stopScan() {
if (mIsScanning) {
mScanButton.setText(R.string.scanner_action_scan);
final BluetoothLeScannerCompat scanner = BluetoothLeScannerCompat.getScanner();
scanner.stopScan(scanCallback);
mIsScanning = false;
}
}
示例3: stopScan
import no.nordicsemi.android.support.v18.scanner.BluetoothLeScannerCompat; //导入方法依赖的package包/类
/**
* stop scanning for bluetooth devices.
*/
public void stopScan() {
final BluetoothLeScannerCompat scanner = BluetoothLeScannerCompat.getScanner();
scanner.stopScan(scanCallback);
mScannerLiveData.scanningStopped();
}