Back
CreateBluetoothSerial
BluetoothSerial object can access the Bluetooth function of the device. It is used for communicating with other Bluetooth devices.
app.CreateBluetoothSerial(
mode ) ->
app object - BluetoothSerial
The following methods are avaiable on the BluetoothSerial object:
GetType() ->
string - "BluetoothSerial"
unknown
clears something?
string
connect to BluetoothSerial device
destroys object
disconnect the device from an eventually existant connection. Calls the OnDisconnect callback function on both devices if they were disconnected
returns wether bluetooth was enabled or not
returns wether the device is connected to an other device via bluetooth
returns wether device is paired with a specific device by its bluetooth name
?
shows an android dialog which asks the user wether he wants to enable bluetooth connection
function(
name,
address )
If the device has sent the connection request
name is of type boolean (true if the connection was established successful)
and address is the BluetoothSerial object
otherwise if the device received the connection request
name is a string with the clients bluetooth name
and address includes the bluetooth address.
SetOnDisconnect was called when the device was disconnected from a bluetooth connection
the callback function was called when data were received via bluetooth
string - "End" or "?"
string - "" or "?"
SetSplitMode
number - milliseconds
SetTimeout
send data via bluetooth to the connected device
object id