BluetoothDevice.ConnectGatt Método
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
Sobrecargas
ConnectGatt(Context, Boolean, BluetoothGattCallback) |
Conecte-se ao servidor GATT hospedado por este dispositivo. |
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports) |
Conecte-se ao servidor GATT hospedado por este dispositivo. |
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy) |
Conecte-se ao servidor GATT hospedado por este dispositivo. |
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy) |
Obsoleto.
|
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy, Handler) |
Conecte-se ao servidor GATT hospedado por este dispositivo. |
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy, Handler) |
Obsoleto.
|
ConnectGatt(Context, Boolean, BluetoothGattCallback)
Conecte-se ao servidor GATT hospedado por este 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
Parâmetros
- context
- Context
- autoConnect
- Boolean
Se deseja conectar-se diretamente ao dispositivo remoto (false) ou conectar-se automaticamente assim que o dispositivo remoto estiver disponível (true).
- callback
- BluetoothGattCallback
Manipulador de retorno de chamada GATT que receberá retornos de chamada assíncronos.
Retornos
- Atributos
Exceções
se o retorno de chamada for nulo
Comentários
Partes desta página são modificações baseadas no trabalho criado e compartilhado pelo Android Open Source Project e usado de acordo com os termos descritos na Creative Commons 2.5 Attribution License.
Aplica-se a
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports)
Conecte-se ao servidor GATT hospedado por este 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
Parâmetros
- context
- Context
- autoConnect
- Boolean
Se deseja conectar-se diretamente ao dispositivo remoto (false) ou conectar-se automaticamente assim que o dispositivo remoto estiver disponível (true).
- callback
- BluetoothGattCallback
Manipulador de retorno de chamada GATT que receberá retornos de chamada assíncronos.
- transport
- BluetoothTransports
transporte preferencial para ligações GATT a dispositivos BluetoothDevice#TRANSPORT_AUTO
remotos de modo duplo ou BluetoothDevice#TRANSPORT_BREDR
BluetoothDevice#TRANSPORT_LE
Retornos
- Atributos
Comentários
Partes desta página são modificações baseadas no trabalho criado e compartilhado pelo Android Open Source Project e usado de acordo com os termos descritos na Creative Commons 2.5 Attribution License.
Aplica-se a
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy)
Conecte-se ao servidor GATT hospedado por este 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
Parâmetros
- context
- Context
- autoConnect
- Boolean
Se deseja conectar-se diretamente ao dispositivo remoto (false) ou conectar-se automaticamente assim que o dispositivo remoto estiver disponível (true).
- callback
- BluetoothGattCallback
Manipulador de retorno de chamada GATT que receberá retornos de chamada assíncronos.
- transport
- BluetoothTransports
transporte preferencial para ligações GATT a dispositivos BluetoothDevice#TRANSPORT_AUTO
remotos de modo duplo ou BluetoothDevice#TRANSPORT_BREDR
BluetoothDevice#TRANSPORT_LE
- phy
- BluetoothPhy
PHY preferencial para conexões com dispositivo LE remoto. Bitwise OU de qualquer um dos BluetoothDevice#PHY_LE_1M_MASK
, BluetoothDevice#PHY_LE_2M_MASK
e BluetoothDevice#PHY_LE_CODED_MASK
. Essa opção não terá efeito se autoConnect
estiver definida como true.
Retornos
- Atributos
Comentários
Partes desta página são modificações baseadas no trabalho criado e compartilhado pelo Android Open Source Project e usado de acordo com os termos descritos na Creative Commons 2.5 Attribution License.
Aplica-se a
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy)
Cuidado
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
Parâmetros
- context
- Context
- autoConnect
- Boolean
- callback
- BluetoothGattCallback
- transport
- BluetoothTransports
- phy
- ScanSettingsPhy
Retornos
- Atributos
Comentários
Partes desta página são modificações baseadas no trabalho criado e compartilhado pelo Android Open Source Project e usado de acordo com os termos descritos na Creative Commons 2.5 Attribution License.
Aplica-se a
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy, Handler)
Conecte-se ao servidor GATT hospedado por este 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
Parâmetros
- context
- Context
- autoConnect
- Boolean
Se deseja conectar-se diretamente ao dispositivo remoto (false) ou conectar-se automaticamente assim que o dispositivo remoto estiver disponível (true).
- callback
- BluetoothGattCallback
Manipulador de retorno de chamada GATT que receberá retornos de chamada assíncronos.
- transport
- BluetoothTransports
transporte preferencial para ligações GATT a dispositivos BluetoothDevice#TRANSPORT_AUTO
remotos de modo duplo ou BluetoothDevice#TRANSPORT_BREDR
BluetoothDevice#TRANSPORT_LE
- phy
- BluetoothPhy
PHY preferencial para conexões com dispositivo LE remoto. Bitwise OU de qualquer um dos BluetoothDevice#PHY_LE_1M_MASK
, BluetoothDevice#PHY_LE_2M_MASK
, um dBluetoothDevice#PHY_LE_CODED_MASK
. Essa opção não terá efeito se autoConnect
estiver definida como true.
- handler
- Handler
O manipulador a ser usado para o retorno de chamada. Se null
, os retornos de chamada acontecerão em um thread em segundo plano não especificado.
Retornos
- Atributos
Comentários
Partes desta página são modificações baseadas no trabalho criado e compartilhado pelo Android Open Source Project e usado de acordo com os termos descritos na Creative Commons 2.5 Attribution License.
Aplica-se a
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy, Handler)
Cuidado
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
Parâmetros
- context
- Context
- autoConnect
- Boolean
- callback
- BluetoothGattCallback
- transport
- BluetoothTransports
- phy
- ScanSettingsPhy
- handler
- Handler
Retornos
- Atributos
Comentários
Partes desta página são modificações baseadas no trabalho criado e compartilhado pelo Android Open Source Project e usado de acordo com os termos descritos na Creative Commons 2.5 Attribution License.