Freigeben über


BluetoothManager.OpenGattServer(Context, BluetoothGattServerCallback) Methode

Definition

Öffnen Sie einen GATT-Server. Der Rückruf wird verwendet, um Ergebnisse an den Aufrufer zu übermitteln, z. B. verbindungsstatus sowie die Ergebnisse anderer GATT-Servervorgänge.

[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

Parameter

context
Context

App-Kontext

callback
BluetoothGattServerCallback

GATT-Serverrückrufhandler, der asynchrone Rückrufe empfängt.

Gibt zurück

BluetoothGattServer-Instanz

Attribute

Hinweise

Java-Dokumentation für android.bluetooth.BluetoothManager.openGattServer(android.content.Context, android.bluetooth.BluetoothGattServerCallback).

Teile dieser Seite sind Änderungen auf der Grundlage von Arbeiten, die vom Android Open Source-Projekt erstellt und freigegeben werden und gemäß den in der Creative Commons 2.5 Attribution License beschriebenen Begriffen verwendet werden.

Gilt für: