Ejemplo n.º 1
0
 @Override
 public void onBatchScanResults(List<ScanResult> results) {
   super.onBatchScanResults(results);
   for (ScanResult result : results) {
     printScanResult("onBatchScanResults", -1 /*unused*/, result);
   }
 }
 @Override
 public void onScanResult(int callbackType, ScanResult result) {
   super.onScanResult(callbackType, result);
   BluetoothDevice device = result.getDevice();
   if (device.getName() == null || !device.getName().contains("Dash")) return;
   Log.v(
       TAG,
       String.format(
           "found device. address[%s] name[%s] type[%s] rssi[%s]",
           device.getAddress(), device.getName(), device.getType(), result.getRssi()));
   devices.put(device, result.getRssi());
   listener.onScanResult(BluetoothScanner.this, device, result.getRssi());
   if (DEBUG) {
     handler.removeCallbacks(finish);
     finish.run();
   }
 }
 @Override
 public void onBatchScanResults(List<ScanResult> results) {
   super.onBatchScanResults(results);
   Log.v(TAG, "batch scan results=" + results.size());
 }
 @Override
 public void onScanFailed(int errorCode) {
   super.onScanFailed(errorCode);
   Log.e(TAG, "error=" + errorCode);
 }
Ejemplo n.º 5
0
 @Override
 public void onScanFailed(int errorCode) {
   super.onScanFailed(errorCode);
   Log.i(TAG, "onScanFailed: errorCode=0x" + Integer.toHexString(errorCode));
 }
Ejemplo n.º 6
0
 @Override
 public void onScanResult(int callbackType, ScanResult result) {
   super.onScanResult(callbackType, result);
   printScanResult("onScanResult", callbackType, result);
 }