Builder used to create new DataSourceRequests.
Public Constructor Summary
Builder()
|
Public Method Summary
StartBleScanRequest |
build()
Finishes building and returns the request.
|
StartBleScanRequest.Builder |
setBleScanCallback(BleScanCallback
bleScanCallback)
Sets the callback to be used when devices are found.
|
StartBleScanRequest.Builder | |
StartBleScanRequest.Builder |
setTimeoutSecs(int stopTimeSecs)
Sets how long to wait before automatically stopping the scan, in seconds.
|
Inherited Method Summary
Public Constructors
public Builder ()
Public Methods
public StartBleScanRequest build ()
Finishes building and returns the request.
Throws
IllegalStateException | If the builder doesn't have enough data to build a valid request. |
---|
public StartBleScanRequest.Builder setBleScanCallback (BleScanCallback bleScanCallback)
Sets the callback to be used when devices are found. The callback must be set or
build()
will throw an exception.
Parameters
bleScanCallback | The callback to be called. |
---|
public StartBleScanRequest.Builder setDataTypes (DataType... dataTypes)
Sets the desired data types to search for on the BLE scan. We'll only return devices which match this data type. If no data types are set, the request will return all compatible devices.
Parameters
dataTypes | The data types to search for. These can be one of the data types listed in
DataType ,
or a custom data type. |
---|
public StartBleScanRequest.Builder setTimeoutSecs (int stopTimeSecs)
Sets how long to wait before automatically stopping the scan, in seconds. If this method isn't called scans will stop after 10 seconds by default.
Parameters
stopTimeSecs | Duration of the scan before stopping. Must be a value between 1 and 60 seconds. |
---|