Interface NonBeaconLeScanCallback


  • @WorkerThread
    public interface NonBeaconLeScanCallback
    Allows an implementation to see non-Beacon BLE devices as they are scanned.

    To use:

    
     public class BeaconReferenceApplication extends Application implements ..., NonBeaconLeScanCallback {
         public void onCreate() {
             super.onCreate();
             BeaconManager beaconManager = BeaconManager.getInstanceForApplication(this);
             ...
             beaconManager.setNonBeaconLeScanCallback(this);
             ...
         }
    
         @Override
         public void onNonBeaconLeScan(BluetoothDevice device, int rssi, byte[] scanRecord) {
              ...
         }
      }
     
    • Method Detail

      • onNonBeaconLeScan

        void onNonBeaconLeScan​(BluetoothDevice device,
                               int rssi,
                               byte[] scanRecord)
        NOTE: This method is NOT called on the main UI thread.
        Parameters:
        device - Identifies the remote device
        rssi - The RSSI value for the remote device as reported by the Bluetooth hardware. 0 if no RSSI value is available.
        scanRecord - The content of the advertisement record offered by the remote device.