Android Open Source - GlassToPhoneBluetooth Client Bluetooth Connection

From Project

Back to project page GlassToPhoneBluetooth.


The source code is released under:

MIT License

If you think the Android project GlassToPhoneBluetooth listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package ktlab.lib.connection.bluetooth;
/* w  w  w.  ja v  a  2s . c  o m*/
import java.nio.ByteOrder;

import ktlab.lib.connection.ConnectionCallback;
import android.bluetooth.BluetoothDevice;
import android.os.Message;

public class ClientBluetoothConnection extends BluetoothConnection {

    private final BluetoothDevice mDevice;

     * create Bluetooth socket
    public ClientBluetoothConnection(ConnectionCallback callback,
            boolean canQueueing, BluetoothDevice device) {
        super(callback, canQueueing);
        mDevice = device;

    public ClientBluetoothConnection(ConnectionCallback callback,
            boolean canQueueing, ByteOrder order, BluetoothDevice device) {
        super(callback, canQueueing, order);
        mDevice = device;

    public void startConnection() {
        Message msg = obtainMessage(EVENT_CONNECT_COMPLETE);
        mConnectionThread = new ClientBluetoothConnectionThread(mDevice, msg);

Java Source Code List