BluetoothGattServerCallback.OnServiceAdded 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
| 名称 | 说明 |
|---|---|
| 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
已添加的服务
- 特性
注解
指示是否已成功添加本地服务。
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。
适用于
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
本页的某些部分是根据 创建和共享的工作进行的修改,并根据 许可证中所述的条款使用。