Code example for BluetoothAdapter

Methods: getProfileProxy

0
        return false; 
    } 
 
    public A2dpDeviceStatus(Context mContext) {
        mAdapter = BluetoothAdapter.getDefaultAdapter();
        mAdapter.getProfileProxy(mContext, mProfileListener,
                BluetoothProfile.A2DP);
    } 
    private BluetoothProfile.ServiceListener mProfileListener =
        new BluetoothProfile.ServiceListener() { 
    public void onServiceConnected(int profile, BluetoothProfile proxy) { 
        if (profile == BluetoothProfile.A2DP) { 
            mA2dp = (BluetoothA2dp) proxy; 
        } 
    } 
    public void onServiceDisconnected(int profile) { 
        if (profile == BluetoothProfile.A2DP) { 
            mA2dp = null; 
        } 
    } 
};