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 實例
- 屬性
備註
此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。