语言

BluetoothSocketSettings.Builder.SetSocketType(Int32) 方法

定义

设置套接字类型。

[Android.Runtime.Register("setSocketType", "(I)Landroid/bluetooth/BluetoothSocketSettings$Builder;", "", ApiSince=36)]
public Android.Bluetooth.BluetoothSocketSettings.Builder SetSocketType(int socketType);
[<Android.Runtime.Register("setSocketType", "(I)Landroid/bluetooth/BluetoothSocketSettings$Builder;", "", ApiSince=36)>]
member this.SetSocketType : int -> Android.Bluetooth.BluetoothSocketSettings.Builder

参数

socketType
Int32

套接字的类型。 值为下列值之一:BluetoothSocket.TYPE_RFCOMM;BluetoothSocket.TYPE_LE

返回

此生成器。 此值不能为 null。

特性

注解

设置套接字类型。

必须是以下项之一:BluetoothSocket.TYPE_RFCOMM;BluetoothSocket.TYPE_LE

默认为BluetoothSocket.TYPE_RFCOMM。

Android 参考。android.bluetooth.BluetoothSocketSettings.Builder.setSocketType

本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。

适用于