- /**
- * This thread runs while attempting to make an outgoing connection
- * with a device. It runs straight through; the connection either
- * succeeds or fails.
- */
+ private ConnectThread connect_thread = null;
+ private Thread input_thread = null;
+
+ private Handler handler;
+
+ private BluetoothAdapter adapter;
+ private BluetoothDevice device;
+ private BluetoothSocket socket;
+ private InputStream input;
+ private OutputStream output;
+
+ // Constructor
+ public AltosBluetooth(BluetoothDevice in_device, Handler in_handler) {
+ adapter = BluetoothAdapter.getDefaultAdapter();
+ device = in_device;
+ handler = in_handler;
+
+ connect_thread = new ConnectThread(device);
+ connect_thread.start();