Android Programming Press on the image to return to the main documentation page.

BLE2Peripheral

List of types:

BlePeripheral2

BlePeripheral2

Allows to configure the device as a BLE peripheral device. Other central devices can connect to this device.
Only supported by some devices running Android 5+. Make sure to check IsPeripheralSupported property.

Events:

Start (Success As Boolean)
Subscribe (DeviceId As String)
Unsubscribe (DeviceId As String)
NewData (DeviceId As String, Data() As Byte)

Members:


  Initialize (EventName As String, Ble As BleManager2)

  IsPeripheralSupported As Boolean [read only]

  Start (Name As String)

  Write (Centrals As List, Data() As Byte)

Members description:

Initialize (EventName As String, Ble As BleManager2)
Initializes the object.
IsPeripheralSupported As Boolean [read only]
Checks whether peripheral mode is supported.
Start (Name As String)
Starts advertising. The name will be set as the device Bluetooth name. Pass an empty string to keep the current name.
The Start event will be raised.
Write (Centrals As List, Data() As Byte)
Writes data to subscribed devices.
Centrals - Target devices. Pass Null to send to all subscribed devices.
Top