Package 

Class ScanFilter.Builder

    • Method Detail

      • setServiceUuid

         ScanFilter.Builder setServiceUuid(ParcelUuid serviceUuid, ParcelUuid uuidMask)

        Set filter on partial service uuid. The {@code uuidMask} is the bit mask for the {@code serviceUuid}. Set any bit in the mask to 1 to indicate a match is needed for thebit in {@code serviceUuid}, and 0 to ignore that bit.

      • setServiceSolicitationUuid

         ScanFilter.Builder setServiceSolicitationUuid(@Nullable() ParcelUuid serviceSolicitationUuid, @Nullable() ParcelUuid solicitationUuidMask)

        Set filter on partial service Solicitation uuid. The {@code SolicitationUuidMask} is thebit mask for the {@code serviceSolicitationUuid}. Set any bit in the mask to 1 toindicate a match is needed for the bit in {@code serviceSolicitationUuid}, and 0 toignore that bit.

        Parameters:
        serviceSolicitationUuid - can only be null if solicitationUuidMask is null.
        solicitationUuidMask - can be null or a mask with no restriction.
      • setServiceData

         ScanFilter.Builder setServiceData(ParcelUuid serviceDataUuid, Array<byte> serviceData, Array<byte> serviceDataMask)

        Set partial filter on service data. For any bit in the mask, set it to 1 if it needs tomatch the one in service data, otherwise set it to 0 to ignore that bit.

        The {@code serviceDataMask} must have the same length of the {@code serviceData}.

      • setManufacturerData

         ScanFilter.Builder setManufacturerData(int manufacturerId, Array<byte> manufacturerData)

        Set filter on on manufacturerData. A negative manufacturerId is considered as invalid id.

        Note the first two bytes of the {@code manufacturerData} is the manufacturerId.

      • setManufacturerData

         ScanFilter.Builder setManufacturerData(int manufacturerId, Array<byte> manufacturerData, Array<byte> manufacturerDataMask)

        Set filter on partial manufacture data. For any bit in the mask, set it the 1 if it needsto match the one in manufacturer data, otherwise set it to 0.

        The {@code manufacturerDataMask} must have the same length of {@code manufacturerData}.