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

BLE

List of types:

BleCharacteristic
BleManager
BleService

BleCharacteristic


Events:

None

Members:


  FORMAT_FLOAT As Int

  FORMAT_SFLOAT As Int

  FORMAT_SINT16 As Int

  FORMAT_SINT32 As Int

  FORMAT_SINT8 As Int

  FORMAT_UINT16 As Int

  FORMAT_UINT32 As Int

  FORMAT_UINT8 As Int

  GetFloatValue (FormatType As Int, Offset As Int) As Float

  GetIntValue (FormatType As Int, Offset As Int) As Int

  GetStringValue (Offset As Int) As String

  GetValue As Byte()

  IsInitialized As Boolean

  Uuid As String [read only]

Members description:

FORMAT_FLOAT As Int
Characteristic value format type float (32-bit float)
FORMAT_SFLOAT As Int
Characteristic value format type sfloat (16-bit float)
FORMAT_SINT16 As Int
Characteristic value format type sint16
FORMAT_SINT32 As Int
Characteristic value format type sint32
FORMAT_SINT8 As Int
Characteristic value format type sint8
FORMAT_UINT16 As Int
Characteristic value format type uint16
FORMAT_UINT32 As Int
Characteristic value format type uint32
FORMAT_UINT8 As Int
Characteristic value format type uint8
GetFloatValue (FormatType As Int, Offset As Int) As Float
GetIntValue (FormatType As Int, Offset As Int) As Int
GetStringValue (Offset As Int) As String
GetValue As Byte()
Returns the raw value.
IsInitialized As Boolean
Uuid As String [read only]
Gets the characteristic Uuid.

BleManager


Permissions:

android.permission.BLUETOOTH
android.permission.BLUETOOTH_ADMIN

Events:

DiscoveryFinished
DeviceFound (Name As String, MacAddress As String)
Connected (Services As Map)
Disconnected
CharacteristicRead (Success As Boolean, Characteristic As BleCharacteristic)

Members:


  BleSupported As Boolean [read only]

  Connect (MacAddress As String, AutoConnect As Boolean)

  Initialize (EventName As String)

  ReadCharacteristic (Characteristic As BleCharacteristic) As Boolean

  Scan (PeriodMs As Long, ServiceUUIDs() As String) As Boolean

Members description:

BleSupported As Boolean [read only]
Tests whether BLE is supported.
Connect (MacAddress As String, AutoConnect As Boolean)
Connects to the device with the given MAC address. You can only connect to a previously discovered device.
AutoConnect - Whether to directly connect to the remote device (false) or to automatically connect as soon as the remote
device becomes available (true).
Initialize (EventName As String)
Initializes the object and sets the subs that will handle the events.
ReadCharacteristic (Characteristic As BleCharacteristic) As Boolean
Starts an asynchronous reading of a characteristic.
Scan (PeriodMs As Long, ServiceUUIDs() As String) As Boolean
Starts scanning for devices.
PeriodMs - Scan period measured in milliseconds.
ServiceUUIDs - An array of UUIDs. Only devices supporting one of the UUIDs will be discovered. Pass Null to discover all devices.

Returns True if the process started successfully.

BleService


Events:

None

Members:


  GetCharacteristics As Map

  IsInitialized As Boolean

  Uuid As String [read only]

Members description:

GetCharacteristics As Map
IsInitialized As Boolean
Uuid As String [read only]
Returns the service UUID.
Top