Condividi tramite


BluetoothManager.OpenGattServer(Context, BluetoothGattServerCallback) Metodo

Definizione

Aprire un server GATT Il callback viene utilizzato per recapitare i risultati al chiamante, ad esempio lo stato della connessione e i risultati di qualsiasi altra operazione del server 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

Parametri

context
Context

Contesto dell'app

callback
BluetoothGattServerCallback

Gestore di callback del server GATT che riceverà callback asincroni.

Restituisce

Istanza di BluetoothGattServer

Attributi

Commenti

Documentazione java per android.bluetooth.BluetoothManager.openGattServer(android.content.Context, android.bluetooth.BluetoothGattServerCallback).

Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dal progetto Open Source Android e usato in base ai termini descritti nella licenza Creative Commons 2.5 Attribuzione.

Si applica a