Api23

constructor(deviceName: String = DEFAULT_NAME, isBluetoothSupported: Boolean = true, isBluetoothEnabled: Boolean = true, isMultipleAdvertisementSupported: Boolean = true, isLocationPermissionGranted: Boolean = true, isLocationEnabled: Boolean = true, advertiser: MockAdvertiser = DEFAULT_MOCK_ADVERTISER, scanner: MockScanner = DEFAULT_MOCK_SCANNER)

Parameters

deviceName

The device name, by default set to "Mock".

isBluetoothSupported

Whether Bluetooth is supported on the device.

isBluetoothEnabled

Whether Bluetooth is enabled on the device.

isMultipleAdvertisementSupported

Whether multi advertisement is supported by the chipset.

isLocationPermissionGranted

Whether the fine location permission is granted.

isLocationEnabled

Whether location service is enabled on the device.

advertiser

A callback that will be called when the app requests to advertise. The callback should return TX power level used for mock advertising.

scanner

A callback that will be called when the mock central manager requests to scan for devices. It returns whether the scan was successful, secretly failed, or returned an error.