BluetoothDevice.ConnectGatt メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
オーバーロード
| ConnectGatt(Context, Boolean, BluetoothGattCallback) |
このデバイスでホストされている GATT サーバーに接続します。 |
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports) |
このデバイスでホストされている GATT サーバーに接続します。 |
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy) |
このデバイスでホストされている GATT サーバーに接続します。 |
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy) |
古い.
|
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy, Handler) |
このデバイスでホストされている GATT サーバーに接続します。 |
| ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy, Handler) |
古い.
|
ConnectGatt(Context, Boolean, BluetoothGattCallback)
このデバイスでホストされている GATT サーバーに接続します。
[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
パラメーター
- context
- Context
- autoConnect
- Boolean
リモート デバイスに直接接続するか (false) にするか、リモート デバイスが使用可能になったらすぐに自動的に接続するか (true)。
- callback
- BluetoothGattCallback
非同期コールバックを受け取る GATT コールバック ハンドラー。
戻り値
- 属性
例外
コールバックが null の場合
注釈
このページの一部は、Android オープンソース プロジェクトによって作成および共有され、クリエイティブ コモンズ 2.5 属性ライセンスに記載されている条件に従って使用される作業に基づく変更です。
適用対象
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports)
このデバイスでホストされている GATT サーバーに接続します。
[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
パラメーター
- context
- Context
- autoConnect
- Boolean
リモート デバイスに直接接続するか (false) にするか、リモート デバイスが使用可能になったらすぐに自動的に接続するか (true)。
- callback
- BluetoothGattCallback
非同期コールバックを受け取る GATT コールバック ハンドラー。
- transport
- BluetoothTransports
リモート デュアルモード デバイスBluetoothDevice#TRANSPORT_AUTOへの GATT 接続またはBluetoothDevice#TRANSPORT_BREDRBluetoothDevice#TRANSPORT_LE
戻り値
- 属性
注釈
このページの一部は、Android オープンソース プロジェクトによって作成および共有され、クリエイティブ コモンズ 2.5 属性ライセンスに記載されている条件に従って使用される作業に基づく変更です。
適用対象
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy)
このデバイスでホストされている GATT サーバーに接続します。
[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
パラメーター
- context
- Context
- autoConnect
- Boolean
リモート デバイスに直接接続するか (false) にするか、リモート デバイスが使用可能になったらすぐに自動的に接続するか (true)。
- callback
- BluetoothGattCallback
非同期コールバックを受け取る GATT コールバック ハンドラー。
- transport
- BluetoothTransports
リモート デュアルモード デバイスBluetoothDevice#TRANSPORT_AUTOへの GATT 接続またはBluetoothDevice#TRANSPORT_BREDRBluetoothDevice#TRANSPORT_LE
- phy
- BluetoothPhy
リモート LE デバイスへの接続に推奨される PHY。 、、および BluetoothDevice#PHY_LE_CODED_MASK〘 のいずれかのBluetoothDevice#PHY_LE_1M_MASKBluetoothDevice#PHY_LE_2M_MASKビットごとの OR true に設定されている場合 autoConnect 、このオプションは有効になりません。
戻り値
- 属性
注釈
このページの一部は、Android オープンソース プロジェクトによって作成および共有され、クリエイティブ コモンズ 2.5 属性ライセンスに記載されている条件に従って使用される作業に基づく変更です。
適用対象
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy)
注意事項
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
パラメーター
- context
- Context
- autoConnect
- Boolean
- callback
- BluetoothGattCallback
- transport
- BluetoothTransports
- phy
- ScanSettingsPhy
戻り値
- 属性
注釈
このページの一部は、Android オープンソース プロジェクトによって作成および共有され、クリエイティブ コモンズ 2.5 属性ライセンスに記載されている条件に従って使用される作業に基づく変更です。
適用対象
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy, Handler)
このデバイスでホストされている GATT サーバーに接続します。
[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
パラメーター
- context
- Context
- autoConnect
- Boolean
リモート デバイスに直接接続するか (false) にするか、リモート デバイスが使用可能になったらすぐに自動的に接続するか (true)。
- callback
- BluetoothGattCallback
非同期コールバックを受け取る GATT コールバック ハンドラー。
- transport
- BluetoothTransports
リモート デュアルモード デバイスBluetoothDevice#TRANSPORT_AUTOへの GATT 接続またはBluetoothDevice#TRANSPORT_BREDRBluetoothDevice#TRANSPORT_LE
- phy
- BluetoothPhy
リモート LE デバイスへの接続に推奨される PHY。 任意BluetoothDevice#PHY_LE_1M_MASKBluetoothDevice#PHY_LE_2M_MASKの 、dBluetoothDevice#PHY_LE_CODED_MASK のビットごとの OR。 true に設定されている場合 autoConnect 、このオプションは有効になりません。
- handler
- Handler
コールバックに使用するハンドラー。 の場合 null、コールバックは指定されていないバックグラウンド スレッドで発生します。
戻り値
- 属性
注釈
このページの一部は、Android オープンソース プロジェクトによって作成および共有され、クリエイティブ コモンズ 2.5 属性ライセンスに記載されている条件に従って使用される作業に基づく変更です。
適用対象
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy, Handler)
注意事項
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
パラメーター
- context
- Context
- autoConnect
- Boolean
- callback
- BluetoothGattCallback
- transport
- BluetoothTransports
- phy
- ScanSettingsPhy
- handler
- Handler
戻り値
- 属性
注釈
このページの一部は、Android オープンソース プロジェクトによって作成および共有され、クリエイティブ コモンズ 2.5 属性ライセンスに記載されている条件に従って使用される作業に基づく変更です。