BluetoothDevice.CreateUsingSocketSettings(BluetoothSocketSettings) 메서드

정의

지정된 소켓 설정을 BluetoothSocketSettings 사용하여 원격 Bluetooth 서버에 연결할 클라이언트 소켓을 만듭니다. 이 API는 사용하여 BluetoothAdapter#listenUsingSocketSettings호스트되는 원격 서버에 연결하는 데 사용됩니다.

[Android.Runtime.Register("createUsingSocketSettings", "(Landroid/bluetooth/BluetoothSocketSettings;)Landroid/bluetooth/BluetoothSocket;", "", ApiSince=36)]
public Android.Bluetooth.BluetoothSocket CreateUsingSocketSettings(Android.Bluetooth.BluetoothSocketSettings settings);
[<Android.Runtime.Register("createUsingSocketSettings", "(Landroid/bluetooth/BluetoothSocketSettings;)Landroid/bluetooth/BluetoothSocket;", "", ApiSince=36)>]
member this.CreateUsingSocketSettings : Android.Bluetooth.BluetoothSocketSettings -> Android.Bluetooth.BluetoothSocket

매개 변수

settings
BluetoothSocketSettings

Bluetooth 소켓 설정 BluetoothSocketSettings.

반품

BluetoothSocket 나가는 연결에 대한 준비입니다.

특성

설명

지정된 소켓 설정을 BluetoothSocketSettings 사용하여 원격 Bluetooth 서버에 연결할 클라이언트 소켓을 만듭니다. 이 API는 사용하여 BluetoothAdapter#listenUsingSocketSettings호스트되는 원격 서버에 연결하는 데 사용됩니다.

<'BluetoothSocket.TYPE_RFCOMM'의 경우 ul><li>: RFCOMM UUID를 사용하여 BluetoothSocketSettings#setRfcommUuid()제공해야 합니다. <li>'BluetoothSocket.TYPE_LE'의 경우: L2cap 프로토콜/PSM(서비스 멀티플렉서) 값을 사용하여 BluetoothSocketSettings#setL2capPsm()제공해야 합니다. </ul>

이 API를 사용하는 애플리케이션은 원격 디바이스에서 프로토콜/서비스 멀티플렉서(psm) 값을 가져옵니다.

나가는 연결을 시작하는 데 사용합니다 BluetoothSocket#connect .

에 대한 android.bluetooth.BluetoothDevice.createUsingSocketSettings(android.bluetooth.BluetoothSocketSettings)Java 설명서

이 페이지의 일부는 만들고 공유한 작업을 기반으로 하며 에 설명된 조건에 따라 사용됩니다.

적용 대상