Package com.codename1.bluetooth.classic
package com.codename1.bluetooth.classic
Classic Bluetooth (BR/EDR): inquiry discovery (ClassicDiscovery),
bonded-device listing and RFCOMM stream connections
(RfcommConnection, RfcommServer).
Obtain via Bluetooth.getInstance().getClassic() and branch on
Bluetooth.getInstance().isClassicSupported() -- iOS does not expose
classic Bluetooth to applications. The RFCOMM streams block and must
be consumed off the EDT.
-
ClassDescriptionThe classic Bluetooth (BR/EDR) role: device discovery, bonding and RFCOMM stream connections.Live handle of a running classic discovery (inquiry scan, ~12 seconds) returned by
BluetoothClassic.startDiscovery(ClassicDiscoveryListener).Receives device sightings during a classic discovery started viaBluetoothClassic.startDiscovery(ClassicDiscoveryListener).One device sighting during a classic discovery, delivered to aClassicDiscoveryListener.An open RFCOMM (Serial Port Profile style) stream connection to a classic Bluetooth device, obtained viaBluetoothClassic.connect(BluetoothDevice, BluetoothUuid, boolean)or accepted from anRfcommServer.A listening RFCOMM endpoint (SPP server) registered with the local SDP database viaBluetoothClassic.listen(String, BluetoothUuid, boolean).