Skip to content

Bluetooth Admin

Non-Visible component
Category Requires Version
Connectivity API 21, Android 5.0 Lollipop 2

Overview

A non-visible component that acts as a bluetooth admin.

Permissions

Events

After Pairing

Event triggers when Pairing has finished.

whenBluetooth Admin.After Pairing address do
Params
address Text

After Scanning

Event triggers when Scanning has finished.

whenBluetooth Admin.After Scanning paired Devices new Devices do
Params
paired Devices Any
new Devices Any

After Unpairing

Event triggers when Unpairing has finished.

whenBluetooth Admin.After Unpairing address do
Params
address Text

Error Occurred

Event triggers when an error occurred.

whenBluetooth Admin.Error Occurred message do
Params
message Text

State Changed

Event triggers when the bluetooth state changed.

whenBluetooth Admin.State Changed state do
Params
state Text

Methods

Disable

Disable Bluetooth

callBluetooth Admin.Disable

Enable

Enable Bluetooth

callBluetooth Admin.Enable

Has Bluetooth

Returns: Boolean

Returns if the device has Bluetooth

callBluetooth Admin.Has Bluetooth

Mac Address

Returns: Text

Returns the Bluetooth MacAddress.

callBluetooth Admin.Mac Address

Pair

Pair Bluetooth device.

callBluetooth Admin.Pairaddress
Params
address Text

Scan

Scan Bluetooth devices. Caution: Performing device discovery is a heavy procedure for the Bluetooth adapter and will consume a lot of its resources. If you already hold a connection with a device, then performing discovery can significantly reduce the bandwidth available for the connection, so you should not perform discovery while connected.

callBluetooth Admin.Scan

Scan Mode

Returns: Text

Returns the scan mode of the Bluetooth Adapter

callBluetooth Admin.Scan Mode

State

Returns: Text

Returns the state of the Bluetooth Adapter.

callBluetooth Admin.State

Toggle

Toggle Bluetooth

callBluetooth Admin.Toggle

Unpairing

Unpair Bluetooth device.

callBluetooth Admin.Unpairingaddress
Params
address Text

Validate Mac Address

Returns: Boolean

Returns true if the MacAddress is valid.

callBluetooth Admin.Validate Mac Addressmac Address
Params
mac Address Text

Validate User Mac Address

Returns: Boolean

Returns true if the User MacAddress is valid.

callBluetooth Admin.Validate User Mac Address

Properties

Use Codes

Boolean Default: False ➖ Read Write - Designer Blocks

Use codes instead of strings in returns for ScanMode and State.

Bluetooth Admin.Use Codes
setBluetooth Admin.Use Codes to