RequestOptionsBuilder.acceptAllDevices constructor

RequestOptionsBuilder.acceptAllDevices({
  1. List<String>? optionalServices,
  2. List? optionalManufacturerData,
})

Tell the browser to just accept all devices.

optionalServices is a list of services that are a nice to have. If a device doesn't have this service then the browser won't reject it.

optionalManufacturerData is a list of manufacturer codes. These codes are then used to grand access to specific manufacturer data. This can be a list of either strings in hexadecimal or ints. NOTE these values can be a maximum of unsigned 16 bits.

NOTE: You NEED to define a service in optionalServices if you want to be able to communicate communicate with a characteristic in it.

NOTE: You NEED to define optionalManufacturerData if you want to get this manufacturer data later.

Implementation

RequestOptionsBuilder.acceptAllDevices({
  final List<String>? optionalServices,
  final List<dynamic>? optionalManufacturerData,
})  : _acceptAllDevices = true,
      _requestFilters = [],
      _exclusionFilters = null,
      _optionalServices = optionalServices,
      _optionalManufacturerData =
          RequestOptionsBuilder._convertOptionalManufacturerData(
              optionalManufacturerData);