BluetoothManager.OpenGattServer(Context, BluetoothGattServerCallback) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
開啟 GATT 伺服器 回撥用於將結果傳送給呼叫者,例如連線狀態以及其他 GATT 伺服器操作的結果。
[Android.Runtime.Register("openGattServer", "(Landroid/content/Context;Landroid/bluetooth/BluetoothGattServerCallback;)Landroid/bluetooth/BluetoothGattServer;", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public Android.Bluetooth.BluetoothGattServer? OpenGattServer(Android.Content.Context? context, Android.Bluetooth.BluetoothGattServerCallback? callback);
[<Android.Runtime.Register("openGattServer", "(Landroid/content/Context;Landroid/bluetooth/BluetoothGattServerCallback;)Landroid/bluetooth/BluetoothGattServer;", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.OpenGattServer : Android.Content.Context * Android.Bluetooth.BluetoothGattServerCallback -> Android.Bluetooth.BluetoothGattServer
參數
- context
- Context
應用程式內容
- callback
- BluetoothGattServerCallback
GATT 伺服器回撥處理器,將接收非同步回撥。
傳回
BluetoothGattServer 實例
- 屬性
備註
開啟 GATT 伺服器 回撥用於將結果傳送給呼叫者,例如連線狀態以及其他 GATT 伺服器操作的結果。 此方法會回傳一個 BluetoothGattServer 實例。 你可以使用 BluetoothGattServer 來執行 GATT 伺服器操作。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。