BluetoothDevice.ConnectGatt Metodo
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
Overload
| Nome | Descrizione |
|---|---|
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy, Handler) |
Connettersi al server GATT ospitato da questo dispositivo. |
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy) |
Obsoleti.
|
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy, Handler) |
Obsoleti.
|
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports) |
Connettersi al server GATT ospitato da questo dispositivo. |
| ConnectGatt(Context, Boolean, BluetoothGattCallback) |
Connettersi al server GATT ospitato da questo dispositivo. |
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy) |
Connettersi al server GATT ospitato da questo dispositivo. |
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy, Handler)
Connettersi al server GATT ospitato da questo dispositivo.
[Android.Runtime.Register("connectGatt", "(Landroid/content/Context;ZLandroid/bluetooth/BluetoothGattCallback;IILandroid/os/Handler;)Landroid/bluetooth/BluetoothGatt;", "", ApiSince=26)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public Android.Bluetooth.BluetoothGatt? ConnectGatt(Android.Content.Context? context, bool autoConnect, Android.Bluetooth.BluetoothGattCallback? callback, Android.Bluetooth.BluetoothTransports transport, Android.Bluetooth.BluetoothPhy phy, Android.OS.Handler? handler);
[<Android.Runtime.Register("connectGatt", "(Landroid/content/Context;ZLandroid/bluetooth/BluetoothGattCallback;IILandroid/os/Handler;)Landroid/bluetooth/BluetoothGatt;", "", ApiSince=26)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.ConnectGatt : Android.Content.Context * bool * Android.Bluetooth.BluetoothGattCallback * Android.Bluetooth.BluetoothTransports * Android.Bluetooth.BluetoothPhy * Android.OS.Handler -> Android.Bluetooth.BluetoothGatt
Parametri
- context
- Context
- autoConnect
- Boolean
Se connettersi direttamente al dispositivo remoto (false) o connettersi automaticamente non appena il dispositivo remoto diventa disponibile (true).
- callback
- BluetoothGattCallback
Gestore di callback GATT che riceverà callback asincroni.
- transport
- BluetoothTransports
trasporto preferito per le connessioni GATT a dispositivi BluetoothDevice#TRANSPORT_AUTO a doppia modalità remota o o BluetoothDevice#TRANSPORT_BREDRBluetoothDevice#TRANSPORT_LE
- phy
- BluetoothPhy
PHY preferito per le connessioni al dispositivo LE remoto. OR bit per bit di uno qualsiasi di BluetoothDevice#PHY_LE_1M_MASK, BluetoothDevice#PHY_LE_2M_MASK, un dBluetoothDevice#PHY_LE_CODED_MASK. Questa opzione non ha effetto se autoConnect è impostata su true.
- handler
- Handler
Gestore da utilizzare per il callback. Se null, i callback verranno eseguiti in un thread in background non specificato.
Valori restituiti
- Attributi
Commenti
Connettersi al server GATT ospitato da questo dispositivo. Il chiamante funge da client GATT. Il callback viene utilizzato per recapitare i risultati al chiamante, ad esempio lo stato della connessione e qualsiasi altra operazione del client GATT. Il metodo restituisce un'istanza BluetoothGatt. È possibile usare BluetoothGatt per eseguire operazioni client GATT.
Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dalla e usati in base ai termini descritti in Creative License 2.5 Attribution License.
Si applica a
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy)
Attenzione
This method has the wrong enumeration. Use the version that takes an 'Android.Bluetooth.BluetoothPhy' instead.
[System.Obsolete("This method has the wrong enumeration. Use the version that takes an 'Android.Bluetooth.BluetoothPhy' instead.")]
public Android.Bluetooth.BluetoothGatt? ConnectGatt(Android.Content.Context? context, bool autoConnect, Android.Bluetooth.BluetoothGattCallback? callback, Android.Bluetooth.BluetoothTransports transport, Android.Bluetooth.LE.ScanSettingsPhy phy);
[<System.Obsolete("This method has the wrong enumeration. Use the version that takes an 'Android.Bluetooth.BluetoothPhy' instead.")>]
member this.ConnectGatt : Android.Content.Context * bool * Android.Bluetooth.BluetoothGattCallback * Android.Bluetooth.BluetoothTransports * Android.Bluetooth.LE.ScanSettingsPhy -> Android.Bluetooth.BluetoothGatt
Parametri
- context
- Context
- autoConnect
- Boolean
- callback
- BluetoothGattCallback
- transport
- BluetoothTransports
- phy
- ScanSettingsPhy
Valori restituiti
- Attributi
Commenti
Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dalla e usati in base ai termini descritti in Creative License 2.5 Attribution License.
Si applica a
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy, Handler)
Attenzione
This method has the wrong enumeration. Use the version that takes an 'Android.Bluetooth.BluetoothPhy' instead.
[System.Obsolete("This method has the wrong enumeration. Use the version that takes an 'Android.Bluetooth.BluetoothPhy' instead.")]
public Android.Bluetooth.BluetoothGatt? ConnectGatt(Android.Content.Context? context, bool autoConnect, Android.Bluetooth.BluetoothGattCallback? callback, Android.Bluetooth.BluetoothTransports transport, Android.Bluetooth.LE.ScanSettingsPhy phy, Android.OS.Handler? handler);
[<System.Obsolete("This method has the wrong enumeration. Use the version that takes an 'Android.Bluetooth.BluetoothPhy' instead.")>]
member this.ConnectGatt : Android.Content.Context * bool * Android.Bluetooth.BluetoothGattCallback * Android.Bluetooth.BluetoothTransports * Android.Bluetooth.LE.ScanSettingsPhy * Android.OS.Handler -> Android.Bluetooth.BluetoothGatt
Parametri
- context
- Context
- autoConnect
- Boolean
- callback
- BluetoothGattCallback
- transport
- BluetoothTransports
- phy
- ScanSettingsPhy
- handler
- Handler
Valori restituiti
- Attributi
Commenti
Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dalla e usati in base ai termini descritti in Creative License 2.5 Attribution License.
Si applica a
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports)
Connettersi al server GATT ospitato da questo dispositivo.
[Android.Runtime.Register("connectGatt", "(Landroid/content/Context;ZLandroid/bluetooth/BluetoothGattCallback;I)Landroid/bluetooth/BluetoothGatt;", "", ApiSince=23)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public Android.Bluetooth.BluetoothGatt? ConnectGatt(Android.Content.Context? context, bool autoConnect, Android.Bluetooth.BluetoothGattCallback? callback, Android.Bluetooth.BluetoothTransports transport);
[<Android.Runtime.Register("connectGatt", "(Landroid/content/Context;ZLandroid/bluetooth/BluetoothGattCallback;I)Landroid/bluetooth/BluetoothGatt;", "", ApiSince=23)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.ConnectGatt : Android.Content.Context * bool * Android.Bluetooth.BluetoothGattCallback * Android.Bluetooth.BluetoothTransports -> Android.Bluetooth.BluetoothGatt
Parametri
- context
- Context
- autoConnect
- Boolean
Se connettersi direttamente al dispositivo remoto (false) o connettersi automaticamente non appena il dispositivo remoto diventa disponibile (true).
- callback
- BluetoothGattCallback
Gestore di callback GATT che riceverà callback asincroni.
- transport
- BluetoothTransports
trasporto preferito per le connessioni GATT a dispositivi BluetoothDevice#TRANSPORT_AUTO a doppia modalità remota o o BluetoothDevice#TRANSPORT_BREDRBluetoothDevice#TRANSPORT_LE
Valori restituiti
- Attributi
Commenti
Connettersi al server GATT ospitato da questo dispositivo. Il chiamante funge da client GATT. Il callback viene utilizzato per recapitare i risultati al chiamante, ad esempio lo stato della connessione e qualsiasi altra operazione del client GATT. Il metodo restituisce un'istanza BluetoothGatt. È possibile usare BluetoothGatt per eseguire operazioni client GATT.
Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dalla e usati in base ai termini descritti in Creative License 2.5 Attribution License.
Si applica a
ConnectGatt(Context, Boolean, BluetoothGattCallback)
Connettersi al server GATT ospitato da questo dispositivo.
[Android.Runtime.Register("connectGatt", "(Landroid/content/Context;ZLandroid/bluetooth/BluetoothGattCallback;)Landroid/bluetooth/BluetoothGatt;", "")]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public Android.Bluetooth.BluetoothGatt? ConnectGatt(Android.Content.Context? context, bool autoConnect, Android.Bluetooth.BluetoothGattCallback? callback);
[<Android.Runtime.Register("connectGatt", "(Landroid/content/Context;ZLandroid/bluetooth/BluetoothGattCallback;)Landroid/bluetooth/BluetoothGatt;", "")>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.ConnectGatt : Android.Content.Context * bool * Android.Bluetooth.BluetoothGattCallback -> Android.Bluetooth.BluetoothGatt
Parametri
- context
- Context
- autoConnect
- Boolean
Se connettersi direttamente al dispositivo remoto (false) o connettersi automaticamente non appena il dispositivo remoto diventa disponibile (true).
- callback
- BluetoothGattCallback
Gestore di callback GATT che riceverà callback asincroni.
Valori restituiti
- Attributi
Eccezioni
se il callback è Null
Commenti
Connettersi al server GATT ospitato da questo dispositivo. Il chiamante funge da client GATT. Il callback viene utilizzato per recapitare i risultati al chiamante, ad esempio lo stato della connessione e qualsiasi altra operazione del client GATT. Il metodo restituisce un'istanza BluetoothGatt. È possibile usare BluetoothGatt per eseguire operazioni client GATT.
Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dalla e usati in base ai termini descritti in Creative License 2.5 Attribution License.
Si applica a
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy)
Connettersi al server GATT ospitato da questo dispositivo.
[Android.Runtime.Register("connectGatt", "(Landroid/content/Context;ZLandroid/bluetooth/BluetoothGattCallback;II)Landroid/bluetooth/BluetoothGatt;", "", ApiSince=26)]
[Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")]
public Android.Bluetooth.BluetoothGatt? ConnectGatt(Android.Content.Context? context, bool autoConnect, Android.Bluetooth.BluetoothGattCallback? callback, Android.Bluetooth.BluetoothTransports transport, Android.Bluetooth.BluetoothPhy phy);
[<Android.Runtime.Register("connectGatt", "(Landroid/content/Context;ZLandroid/bluetooth/BluetoothGattCallback;II)Landroid/bluetooth/BluetoothGatt;", "", ApiSince=26)>]
[<Android.Runtime.RequiresPermission("android.permission.BLUETOOTH_CONNECT")>]
member this.ConnectGatt : Android.Content.Context * bool * Android.Bluetooth.BluetoothGattCallback * Android.Bluetooth.BluetoothTransports * Android.Bluetooth.BluetoothPhy -> Android.Bluetooth.BluetoothGatt
Parametri
- context
- Context
- autoConnect
- Boolean
Se connettersi direttamente al dispositivo remoto (false) o connettersi automaticamente non appena il dispositivo remoto diventa disponibile (true).
- callback
- BluetoothGattCallback
Gestore di callback GATT che riceverà callback asincroni.
- transport
- BluetoothTransports
trasporto preferito per le connessioni GATT a dispositivi BluetoothDevice#TRANSPORT_AUTO a doppia modalità remota o o BluetoothDevice#TRANSPORT_BREDRBluetoothDevice#TRANSPORT_LE
- phy
- BluetoothPhy
PHY preferito per le connessioni al dispositivo LE remoto. OR bit per bit di uno qualsiasi di BluetoothDevice#PHY_LE_1M_MASK, BluetoothDevice#PHY_LE_2M_MASKe BluetoothDevice#PHY_LE_CODED_MASK. Questa opzione non ha effetto se autoConnect è impostata su true.
Valori restituiti
- Attributi
Commenti
Connettersi al server GATT ospitato da questo dispositivo. Il chiamante funge da client GATT. Il callback viene utilizzato per recapitare i risultati al chiamante, ad esempio lo stato della connessione e qualsiasi altra operazione del client GATT. Il metodo restituisce un'istanza BluetoothGatt. È possibile usare BluetoothGatt per eseguire operazioni client GATT.
Le parti di questa pagina sono modifiche basate sul lavoro creato e condiviso dalla e usati in base ai termini descritti in Creative License 2.5 Attribution License.