BluetoothDevice.ConnectGatt Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Überlädt
| ConnectGatt(Context, Boolean, BluetoothGattCallback) |
Stellen Sie eine Verbindung mit dem GATT-Server her, der von diesem Gerät gehostet wird. |
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports) |
Stellen Sie eine Verbindung mit dem GATT-Server her, der von diesem Gerät gehostet wird. |
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy) |
Stellen Sie eine Verbindung mit dem GATT-Server her, der von diesem Gerät gehostet wird. |
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy) |
Veraltet.
|
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy, Handler) |
Stellen Sie eine Verbindung mit dem GATT-Server her, der von diesem Gerät gehostet wird. |
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy, Handler) |
Veraltet.
|
ConnectGatt(Context, Boolean, BluetoothGattCallback)
Stellen Sie eine Verbindung mit dem GATT-Server her, der von diesem Gerät gehostet wird.
[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
Parameter
- context
- Context
- autoConnect
- Boolean
Gibt an, ob eine direkte Verbindung mit dem Remotegerät hergestellt werden soll (false) oder automatisch eine Verbindung herzustellen, sobald das Remotegerät verfügbar ist (true).
- callback
- BluetoothGattCallback
GATT-Rückrufhandler, der asynchrone Rückrufe empfängt.
Gibt zurück
- Attribute
Ausnahmen
wenn der Rückruf null ist
Hinweise
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:
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports)
Stellen Sie eine Verbindung mit dem GATT-Server her, der von diesem Gerät gehostet wird.
[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
Parameter
- context
- Context
- autoConnect
- Boolean
Gibt an, ob eine direkte Verbindung mit dem Remotegerät hergestellt werden soll (false) oder automatisch eine Verbindung herzustellen, sobald das Remotegerät verfügbar ist (true).
- callback
- BluetoothGattCallback
GATT-Rückrufhandler, der asynchrone Rückrufe empfängt.
- transport
- BluetoothTransports
bevorzugter Transport für GATT-Verbindungen mit Remotegeräten mit dualen Modus BluetoothDevice#TRANSPORT_AUTO oder BluetoothDevice#TRANSPORT_BREDRBluetoothDevice#TRANSPORT_LE
Gibt zurück
- Attribute
Hinweise
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:
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy)
Stellen Sie eine Verbindung mit dem GATT-Server her, der von diesem Gerät gehostet wird.
[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
Parameter
- context
- Context
- autoConnect
- Boolean
Gibt an, ob eine direkte Verbindung mit dem Remotegerät hergestellt werden soll (false) oder automatisch eine Verbindung herzustellen, sobald das Remotegerät verfügbar ist (true).
- callback
- BluetoothGattCallback
GATT-Rückrufhandler, der asynchrone Rückrufe empfängt.
- transport
- BluetoothTransports
bevorzugter Transport für GATT-Verbindungen mit Remotegeräten mit dualen Modus BluetoothDevice#TRANSPORT_AUTO oder BluetoothDevice#TRANSPORT_BREDRBluetoothDevice#TRANSPORT_LE
- phy
- BluetoothPhy
bevorzugtes PHY für Verbindungen mit Remote-LE-Geräten. Bitweise ODER eines von BluetoothDevice#PHY_LE_1M_MASK, BluetoothDevice#PHY_LE_2M_MASKund BluetoothDevice#PHY_LE_CODED_MASK. Diese Option wird nicht wirksam, wenn autoConnect sie auf "true" festgelegt ist.
Gibt zurück
- Attribute
Hinweise
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:
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy)
Achtung
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
Parameter
- context
- Context
- autoConnect
- Boolean
- callback
- BluetoothGattCallback
- transport
- BluetoothTransports
- phy
- ScanSettingsPhy
Gibt zurück
- Attribute
Hinweise
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:
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy, Handler)
Stellen Sie eine Verbindung mit dem GATT-Server her, der von diesem Gerät gehostet wird.
[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
Parameter
- context
- Context
- autoConnect
- Boolean
Gibt an, ob eine direkte Verbindung mit dem Remotegerät hergestellt werden soll (false) oder automatisch eine Verbindung herzustellen, sobald das Remotegerät verfügbar ist (true).
- callback
- BluetoothGattCallback
GATT-Rückrufhandler, der asynchrone Rückrufe empfängt.
- transport
- BluetoothTransports
bevorzugter Transport für GATT-Verbindungen mit Remotegeräten mit dualen Modus BluetoothDevice#TRANSPORT_AUTO oder BluetoothDevice#TRANSPORT_BREDRBluetoothDevice#TRANSPORT_LE
- phy
- BluetoothPhy
bevorzugtes PHY für Verbindungen mit Remote-LE-Geräten. Bitweise ODER eines von BluetoothDevice#PHY_LE_1M_MASK, BluetoothDevice#PHY_LE_2M_MASKan dBluetoothDevice#PHY_LE_CODED_MASK. Diese Option wird nicht wirksam, wenn autoConnect sie auf "true" festgelegt ist.
- handler
- Handler
Der für den Rückruf zu verwendende Handler. Wenn null, werden Rückrufe in einem nicht angegebenen Hintergrundthread ausgeführt.
Gibt zurück
- Attribute
Hinweise
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:
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy, Handler)
Achtung
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
Parameter
- context
- Context
- autoConnect
- Boolean
- callback
- BluetoothGattCallback
- transport
- BluetoothTransports
- phy
- ScanSettingsPhy
- handler
- Handler
Gibt zurück
- Attribute
Hinweise
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.