BluetoothGattServerCallback.OnServiceAdded 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| 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
新增的服務
- 屬性
備註
表示是否已成功新增本地服務。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
適用於
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
新增的服務
- 屬性
備註
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。