@Test public void testScanFilterMatchingAllBeacons() { final List<ScanFilter> scanFilters = parser.asScanFilters( Collections.<Region>emptyList() ); assertEquals( singletonList( new ScanFilter .Builder() .setManufacturerData( 280, new byte[24], new byte[24] ) .build() ), scanFilters ); }
@NonNull @Override public List<ScanFilter> asScanFilters(@NonNull List<Region> regions) { final List<ScanFilter> scanFilters = new ArrayList<>(); try { if (regions.isEmpty()) { scanFilters.add( getScanFilter(new Region.Builder().build()) ); } else { for (Region region : regions) { scanFilters.add(getScanFilter(region)); } } } catch (Exception e) { BeaconLogger.e( "Could not create scan filters based on the beacon layout and provided regions; " + "the scan filters to be used are: " + scanFilters.toString() ); } return scanFilters; }
BeaconParser implements IBeaconParser { @NonNull @Override public List<ScanFilter> asScanFilters(@NonNull List<Region> regions) { final List<ScanFilter> scanFilters = new ArrayList<>(); try { if (regions.isEmpty()) { scanFilters.add( getScanFilter(new Region.Builder().build()) ); } else { for (Region region : regions) { scanFilters.add(getScanFilter(region)); } } } catch (Exception e) { BeaconLogger.e( "Could not create scan filters based on the beacon layout and provided regions; " + "the scan filters to be used are: " + scanFilters.toString() ); } return scanFilters; } }
BeaconParser implements IBeaconParser { @NonNull @Override public List<ScanFilter> asScanFilters(@NonNull List<Region> regions) { final List<ScanFilter> scanFilters = new ArrayList<>(); try { if (regions.isEmpty()) { scanFilters.add( getScanFilter(new Region.Builder().build()) ); } else { for (Region region : regions) { scanFilters.add(getScanFilter(region)); } } } catch (Exception e) { BeaconLogger.e( "Could not create scan filters based on the beacon layout and provided regions; " + "the scan filters to be used are: " + scanFilters.toString() ); } return scanFilters; } BeaconParser(@NonNull List<IFieldConverter<?>> fieldConverters,
                 int beaconTypeIndex,
                 int manufacturerId,
                 Object beaconType,
                 int txPowerIndex); }
BeaconParser implements IBeaconParser { @NonNull @Override public List<ScanFilter> asScanFilters(@NonNull List<Region> regions) { final List<ScanFilter> scanFilters = new ArrayList<>(); try { if (regions.isEmpty()) { scanFilters.add( getScanFilter(new Region.Builder().build()) ); } else { for (Region region : regions) { scanFilters.add(getScanFilter(region)); } } } catch (Exception e) { BeaconLogger.e( "Could not create scan filters based on the beacon layout and provided regions; " + "the scan filters to be used are: " + scanFilters.toString() ); } return scanFilters; } BeaconParser(@NonNull List<IFieldConverter<?>> fieldConverters,
                 int beaconTypeIndex,
                 int manufacturerId,
                 Object beaconType,
                 int txPowerIndex); @Override @Nullable Beacon parse(@NonNull ScanResult scanResult); @NonNull @Override List<ScanFilter> asScanFilters(@NonNull List<Region> regions); }
BeaconParser implements IBeaconParser { @NonNull @Override public List<ScanFilter> asScanFilters(@NonNull List<Region> regions) { final List<ScanFilter> scanFilters = new ArrayList<>(); try { if (regions.isEmpty()) { scanFilters.add( getScanFilter(new Region.Builder().build()) ); } else { for (Region region : regions) { scanFilters.add(getScanFilter(region)); } } } catch (Exception e) { BeaconLogger.e( "Could not create scan filters based on the beacon layout and provided regions; " + "the scan filters to be used are: " + scanFilters.toString() ); } return scanFilters; } BeaconParser(@NonNull List<IFieldConverter<?>> fieldConverters,
                 int beaconTypeIndex,
                 int manufacturerId,
                 Object beaconType,
                 int txPowerIndex); @Override @Nullable Beacon parse(@NonNull ScanResult scanResult); @NonNull @Override List<ScanFilter> asScanFilters(@NonNull List<Region> regions);  }