Aracılığıyla paylaş


BluetoothDevice.CreateL2capChannel(Int32) Method

Definition

Create a Bluetooth L2CAP Connection-oriented Channel (CoC) BluetoothSocket that can be used to start a secure outgoing connection to the remote device with the same dynamic protocol/service multiplexer (PSM) value.

[Android.Runtime.Register("createL2capChannel", "(I)Landroid/bluetooth/BluetoothSocket;", "", ApiSince=29)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public Android.Bluetooth.BluetoothSocket CreateL2capChannel (int psm);
[<Android.Runtime.Register("createL2capChannel", "(I)Landroid/bluetooth/BluetoothSocket;", "", ApiSince=29)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.CreateL2capChannel : int -> Android.Bluetooth.BluetoothSocket

Parameters

psm
Int32

dynamic PSM value from remote device

Returns

a CoC #BluetoothSocket ready for an outgoing connection

Attributes

Remarks

Java documentation for android.bluetooth.BluetoothDevice.createL2capChannel(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to