Nexus4

class Nexus4(deviceName: String = "Nexus 4", isBluetoothEnabled: Boolean = true, advertiser: MockAdvertiser = DEFAULT_MOCK_ADVERTISER, scanner: MockScanner = DEFAULT_MOCK_SCANNER) : MockEnvironment

Constructors

Link copied to clipboard
constructor(deviceName: String = "Nexus 4", isBluetoothEnabled: Boolean = true, advertiser: MockAdvertiser = DEFAULT_MOCK_ADVERTISER, scanner: MockScanner = DEFAULT_MOCK_SCANNER)

Properties

Link copied to clipboard

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

Link copied to clipboard

The Android SDK version.

Link copied to clipboard
Link copied to clipboard

Whether the BLUETOOTH_ADVERTISE permission is granted.

Link copied to clipboard

Whether the BLUETOOTH_CONNECT permission is granted.

Link copied to clipboard
Link copied to clipboard

Whether the BLUETOOTH_SCAN permission is granted.

Link copied to clipboard
Link copied to clipboard

Whether LE 2M PHY is supported on the device.

Link copied to clipboard

Whether LE Coded PHY is supported on the device.

Link copied to clipboard

Whether LE Extended Advertising feature is supported.

Link copied to clipboard

Whether location service is enabled on the device.

Link copied to clipboard

Whether the fine location permission is granted.

Link copied to clipboard

Whether location is required to scan for Bluetooth devices.

Link copied to clipboard

Whether multi advertisement is supported by the chipset.

Link copied to clipboard

Whether the device can scan for Bluetooth LE devices advertising on LE Coded PHY as Primary PHY.

Link copied to clipboard

Some Android devices claim they can only transmit 27-byte long packets on L2CAP in the LLCP Data Length Update procedure, while later trying to send 251 bytes. This causes the peripheral to terminate the connection. This flag simulates this issue. It was encountered e.g. on Samsung A8 and Samsung A8 Tab.

Link copied to clipboard

Some early Android devices were sending only one Scan Request message for a single device per scan. Non-connectable devices were reported continuously, but connectable devices were reported only once. The client had to stop and start scanning again to receive further advertisements. This flag simulates this issue. It was encountered e.g. on Nexus 4.

Link copied to clipboard
val leMaximumAdvertisingDataLength: @Range(from = 31, to = 1650) Int

The maximum LE advertising data length in bytes, if LE Extended Advertising feature is supported.

Link copied to clipboard

Whether the device requires runtime permissions to use Bluetooth.

Link copied to clipboard

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.