Package com.tapkey.mobile.ble
Class TapkeyBleAdvertisingFormatBuilder
- java.lang.Object
-
- com.tapkey.mobile.ble.TapkeyBleAdvertisingFormatBuilder
-
public class TapkeyBleAdvertisingFormatBuilder extends Object
Builder forTapkeyBleAdvertisingFormat
objects.
-
-
Constructor Summary
Constructors Constructor Description TapkeyBleAdvertisingFormatBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TapkeyBleAdvertisingFormatBuilder
addV1Format(Func<String,RuntimeException> serviceUuid)
Adds support for Tapkey Advertising format version 1.TapkeyBleAdvertisingFormatBuilder
addV1Format(String serviceUuid)
Adds support for Tapkey Advertising format version 1.TapkeyBleAdvertisingFormatBuilder
addV2Format(Func<Integer,RuntimeException> domainId)
Adds support for Tapkey Advertising format version 2.TapkeyBleAdvertisingFormatBuilder
addV2Format(Integer domainId)
Adds support for Tapkey Advertising format version 2.TapkeyBleAdvertisingFormat
build()
Builds and returns theTapkeyBleAdvertisingFormat
instance.
-
-
-
Method Detail
-
addV1Format
public TapkeyBleAdvertisingFormatBuilder addV1Format(String serviceUuid)
Adds support for Tapkey Advertising format version 1. This version is based on a 128-bit service UUID and associated data contained in a Manufacturer Specific Data block.- Parameters:
serviceUuid
- The 128-bit service UUID to be used.- Returns:
- the builder instance.
-
addV1Format
public TapkeyBleAdvertisingFormatBuilder addV1Format(Func<String,RuntimeException> serviceUuid)
Adds support for Tapkey Advertising format version 1. This version is based on a 128-bit service UUID and associated data contained in a Manufacturer Specific Data block.- Parameters:
serviceUuid
- a function returning the 128-bit service UUID to be used.- Returns:
- the builder instance.
-
addV2Format
public TapkeyBleAdvertisingFormatBuilder addV2Format(Integer domainId)
Adds support for Tapkey Advertising format version 2. This version is based on Tapkey's official 16-bit service UUID (0xfd5e). The associated data is contained in a 'Service Data' block. V2 features the notion of a domain ID, which can be used to keep different Tapkey-based solutions apart. The domain ID is assigned by Tapkey.- Parameters:
domainId
- the domain id to filter for. If null, then no filtering for domain IDs is applied.- Returns:
- the builder instance.
-
addV2Format
public TapkeyBleAdvertisingFormatBuilder addV2Format(Func<Integer,RuntimeException> domainId)
Adds support for Tapkey Advertising format version 2. This version is based on Tapkey's official 16-bit service UUID (0xfd5e). The associated data is contained in a 'Service Data' block. V2 features the notion of a domain ID, which can be used to keep different Tapkey-based solutions apart. The domain ID is assigned by Tapkey.- Parameters:
domainId
- a function returning the domain id to filter for. If null is returned, then no filtering for domain IDs is applied.- Returns:
- the builder instance.
-
build
public TapkeyBleAdvertisingFormat build()
Builds and returns theTapkeyBleAdvertisingFormat
instance.- Returns:
-
-