BluetoothDevice.ConnectGatt 메서드

정의

오버로드

Name Description
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy, Handler)

이 디바이스에서 호스트하는 GATT 서버에 연결합니다.

ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy)
사용되지 않음.
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, ScanSettingsPhy, Handler)
사용되지 않음.
ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports)

이 디바이스에서 호스트하는 GATT 서버에 연결합니다.

ConnectGatt(Context, Boolean, BluetoothGattCallback)

이 디바이스에서 호스트하는 GATT 서버에 연결합니다.

ConnectGatt(Context, Boolean, BluetoothGattCallback, BluetoothTransports, BluetoothPhy)

이 디바이스에서 호스트하는 GATT 서버에 연결합니다.

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 또는 BluetoothDevice#TRANSPORT_BREDR 또는 GATT 연결에 대한 기본 전송 BluetoothDevice#TRANSPORT_LE

phy
BluetoothPhy

원격 LE 디바이스에 연결하기 위한 기본 PHY입니다. 비트 OR의 BluetoothDevice#PHY_LE_1M_MASK모든 , BluetoothDevice#PHY_LE_2M_MASKdBluetoothDevice#PHY_LE_CODED_MASK. true로 설정된 경우 autoConnect 이 옵션은 적용되지 않습니다.

handler
Handler

콜백에 사용할 처리기입니다. 이 경우 null지정되지 않은 백그라운드 스레드에서 콜백이 발생합니다.

반품

특성

설명

이 디바이스에서 호스트하는 GATT 서버에 연결합니다. 호출자는 GATT 클라이언트 역할을 합니다. 콜백은 연결 상태 및 추가 GATT 클라이언트 작업과 같은 결과를 호출자에게 전달하는 데 사용됩니다. 이 메서드는 BluetoothGatt 인스턴스를 반환합니다. BluetoothGatt를 사용하여 GATT 클라이언트 작업을 수행할 수 있습니다.

에 대한 android.bluetooth.BluetoothDevice.connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int, int, android.os.Handler)Java 설명서

이 페이지의 일부는 만들고 공유한 작업을 기반으로 하며 에 설명된 조건에 따라 사용됩니다.

적용 대상

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

반품

특성

설명

이 페이지의 일부는 만들고 공유한 작업을 기반으로 하며 에 설명된 조건에 따라 사용됩니다.

적용 대상

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
handler
Handler

반품

특성

설명

이 페이지의 일부는 만들고 공유한 작업을 기반으로 하며 에 설명된 조건에 따라 사용됩니다.

적용 대상

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 또는 BluetoothDevice#TRANSPORT_BREDR 또는 GATT 연결에 대한 기본 전송 BluetoothDevice#TRANSPORT_LE

반품

특성

설명

이 디바이스에서 호스트하는 GATT 서버에 연결합니다. 호출자는 GATT 클라이언트 역할을 합니다. 콜백은 연결 상태 및 추가 GATT 클라이언트 작업과 같은 결과를 호출자에게 전달하는 데 사용됩니다. 이 메서드는 BluetoothGatt 인스턴스를 반환합니다. BluetoothGatt를 사용하여 GATT 클라이언트 작업을 수행할 수 있습니다.

에 대한 android.bluetooth.BluetoothDevice.connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int)Java 설명서

이 페이지의 일부는 만들고 공유한 작업을 기반으로 하며 에 설명된 조건에 따라 사용됩니다.

적용 대상

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이면

설명

이 디바이스에서 호스트하는 GATT 서버에 연결합니다. 호출자는 GATT 클라이언트 역할을 합니다. 콜백은 연결 상태 및 추가 GATT 클라이언트 작업과 같은 결과를 호출자에게 전달하는 데 사용됩니다. 이 메서드는 BluetoothGatt 인스턴스를 반환합니다. BluetoothGatt를 사용하여 GATT 클라이언트 작업을 수행할 수 있습니다.

에 대한 android.bluetooth.BluetoothDevice.connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback)Java 설명서

이 페이지의 일부는 만들고 공유한 작업을 기반으로 하며 에 설명된 조건에 따라 사용됩니다.

적용 대상

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 또는 BluetoothDevice#TRANSPORT_BREDR 또는 GATT 연결에 대한 기본 전송 BluetoothDevice#TRANSPORT_LE

phy
BluetoothPhy

원격 LE 디바이스에 연결하기 위한 기본 PHY입니다. 의 비트 OR BluetoothDevice#PHY_LE_1M_MASKBluetoothDevice#PHY_LE_2M_MASKBluetoothDevice#PHY_LE_CODED_MASK. true로 설정된 경우 autoConnect 이 옵션은 적용되지 않습니다.

반품

특성

설명

이 디바이스에서 호스트하는 GATT 서버에 연결합니다. 호출자는 GATT 클라이언트 역할을 합니다. 콜백은 연결 상태 및 추가 GATT 클라이언트 작업과 같은 결과를 호출자에게 전달하는 데 사용됩니다. 이 메서드는 BluetoothGatt 인스턴스를 반환합니다. BluetoothGatt를 사용하여 GATT 클라이언트 작업을 수행할 수 있습니다.

에 대한 android.bluetooth.BluetoothDevice.connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback, int, int)Java 설명서

이 페이지의 일부는 만들고 공유한 작업을 기반으로 하며 에 설명된 조건에 따라 사용됩니다.

적용 대상