Code example for BluetoothAdapter

Methods: getProfileProxy

0
        if (mBluetoothAdapter != null)
        { 
            if (mAudioManager.isBluetoothScoAvailableOffCall())
            { 
                // All the detection and audio connection are done in mHeadsetProfileListener 
                if (mBluetoothAdapter.getProfileProxy(mContext, 
                                                    mHeadsetProfileListener, 
                                                    BluetoothProfile.HEADSET))
                { 
                    return true; 
                } 
            } 
        } 
 
        return false; 
    } 
 
    /** 
     * API < 11 
     * Unregister broadcast receivers and stop Sco audio connection 
     * and cancel count down.