public class BTClient
extends java.lang.Object
implements java.io.Closeable
Constructor and Description |
---|
BTClient(Context context,
BTSocketListener.Callback callback,
BluetoothDevice device,
java.util.UUID serverUuid)
Connect to a bluetooth service.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the connection.
|
void |
sendMessage(BTMessage msg)
Sends a
BTMessage to the connected bluetooth service. |
public BTClient(Context context, BTSocketListener.Callback callback, BluetoothDevice device, java.util.UUID serverUuid) throws java.io.IOException
callback
- the event handler.device
- the device to connectserverUuid
- the application UUID
java.io.IOException