Code example for BluetoothDevice

Methods: getName

0
        mConnectedThread.start();
 
        // Send the name of the connected device back to the UI Activity 
        Message msg = mHandler.obtainMessage(MESSAGE_DEVICE_NAME);
        Bundle bundle = new Bundle();
        bundle.putString(DEVICE_NAME, device.getName());
        msg.setData(bundle);
        mHandler.sendMessage(msg);
 
        setState(STATE_CONNECTED);
    } 
 
    /** 
     * Stop all threads 
     */ 
    public synchronized void stop() { 
        if (D) Log.d(TAG, "stop");
 
        if (mConnectThread != null) {
            mConnectThread.cancel();
            mConnectThread = null;