Code example for BluetoothAdapter

Methods: getName

0
 
    public BluetoothService(Context context, Handler handler) {
        Log.i(TAG, "++ BluetoothService ++");
         
        mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
        mLocalDeviceName = mBluetoothAdapter.getName();
        mState = STATE_NONE;
        mBtRemoteHandler = handler;
        mPresModeHandler = null;
    } 
 
    public synchronized void start() { 
        Log.i(TAG, "--- start ---");
 
        // Cancel any thread attempting to make a connection 
        if (mConnectThread != null) {
            mConnectThread.cancel();
            mConnectThread = null;
        } 
 
        // Cancel any thread currently running a connection