语言

BluetoothGattServerCallback.OnServiceAdded 方法

定义

重载

名称 说明
OnServiceAdded(GattStatus, BluetoothGattService)

指示是否已成功添加本地服务。

OnServiceAdded(ProfileState, BluetoothGattService)
已过时.

指示是否已成功添加本地服务。

OnServiceAdded(GattStatus, BluetoothGattService)

指示是否已成功添加本地服务。

[Android.Runtime.Register("onServiceAdded", "(ILandroid/bluetooth/BluetoothGattService;)V", "GetOnServiceAdded_ILandroid_bluetooth_BluetoothGattService_Handler")]
public virtual void OnServiceAdded(Android.Bluetooth.GattStatus status, Android.Bluetooth.BluetoothGattService? service);
[<Android.Runtime.Register("onServiceAdded", "(ILandroid/bluetooth/BluetoothGattService;)V", "GetOnServiceAdded_ILandroid_bluetooth_BluetoothGattService_Handler")>]
abstract member OnServiceAdded : Android.Bluetooth.GattStatus * Android.Bluetooth.BluetoothGattService -> unit
override this.OnServiceAdded : Android.Bluetooth.GattStatus * Android.Bluetooth.BluetoothGattService -> unit

参数

status
GattStatus

返回 BluetoothGatt#GATT_SUCCESS 是否已成功添加服务。

service
BluetoothGattService

已添加的服务

特性

注解

指示是否已成功添加本地服务。

Java文档android.bluetooth.BluetoothGattServerCallback.onServiceAdded(int, android.bluetooth.BluetoothGattService)。

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

适用于

OnServiceAdded(ProfileState, BluetoothGattService)

注意

Use OnServiceAdded(Android.Bluetooth.GattStatus, Android.Bluetooth.BluetoothGattService)

指示是否已成功添加本地服务。

[Android.Runtime.Register("onServiceAdded", "(ILandroid/bluetooth/BluetoothGattService;)V", "GetOnServiceAdded_ILandroid_bluetooth_BluetoothGattService_Handler_ext")]
[System.Obsolete("Use OnServiceAdded(Android.Bluetooth.GattStatus, Android.Bluetooth.BluetoothGattService)", true)]
public virtual void OnServiceAdded(Android.Bluetooth.ProfileState status, Android.Bluetooth.BluetoothGattService service);
[<Android.Runtime.Register("onServiceAdded", "(ILandroid/bluetooth/BluetoothGattService;)V", "GetOnServiceAdded_ILandroid_bluetooth_BluetoothGattService_Handler_ext")>]
[<System.Obsolete("Use OnServiceAdded(Android.Bluetooth.GattStatus, Android.Bluetooth.BluetoothGattService)", true)>]
abstract member OnServiceAdded : Android.Bluetooth.ProfileState * Android.Bluetooth.BluetoothGattService -> unit
override this.OnServiceAdded : Android.Bluetooth.ProfileState * Android.Bluetooth.BluetoothGattService -> unit

参数

status
ProfileState

返回 GattSuccess 是否已成功添加服务。

service
BluetoothGattService

已添加的服务

特性

注解

指示是否已成功添加本地服务。

Android 参考。android.bluetooth.BluetoothGattServerCallback.onServiceAdded

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

适用于