Lines Matching refs:device
38 * incoming connections, a thread for connecting with a device, and a
68 public static final int STATE_CONNECTED = 3; // now connected to a remote device
135 * Start the ConnectThread to initiate a connection to a remote device.
137 * @param device The BluetoothDevice to connect
140 public synchronized void connect(BluetoothDevice device, boolean secure) {
141 Log.d(TAG, "connect to: " + device);
157 // Start the thread to connect with the given device
158 mConnectThread = new ConnectThread(device, secure);
167 * @param device The BluetoothDevice that has been connected
170 device, final String socketType) {
185 // Cancel the accept thread because we only want to connect to one device
199 // Send the name of the connected device back to the UI Activity
202 bundle.putString(Constants.DEVICE_NAME, device.getName());
262 bundle.putString(Constants.TOAST, "Unable to connect device");
277 bundle.putString(Constants.TOAST, "Device connection was lost");
372 * with a device. It runs straight through; the connection either
380 public ConnectThread(BluetoothDevice device, boolean secure) {
381 mmDevice = device;
389 tmp = device.createRfcommSocketToServiceRecord(
392 tmp = device.createInsecureRfcommSocketToServiceRecord(
444 * This thread runs during a connection with a remote device.