다음을 통해 공유


BluetoothDevice.ConnectGatt 메서드

정의

오버로드

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.bluetooth.BluetoothDevice.connectGatt(android.content.Context, boolean, android.bluetooth.BluetoothGattCallback)Java 설명서

이 페이지의 일부는 Android 오픈 소스 프로젝트에서 만들고 공유하고 Creative Commons 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 또는 BluetoothDevice#TRANSPORT_BREDR 또는 GATT 연결에 대한 기본 전송 BluetoothDevice#TRANSPORT_LE

반환

특성

설명

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

이 페이지의 일부는 Android 오픈 소스 프로젝트에서 만들고 공유하고 Creative Commons 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 또는 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 이 옵션은 적용되지 않습니다.

반환

특성

설명

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

이 페이지의 일부는 Android 오픈 소스 프로젝트에서 만들고 공유하고 Creative Commons 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

반환

특성

설명

이 페이지의 일부는 Android 오픈 소스 프로젝트에서 만들고 공유하고 Creative Commons 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 또는 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지정되지 않은 백그라운드 스레드에서 콜백이 발생합니다.

반환

특성

설명

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

이 페이지의 일부는 Android 오픈 소스 프로젝트에서 만들고 공유하고 Creative Commons 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
handler
Handler

반환

특성

설명

이 페이지의 일부는 Android 오픈 소스 프로젝트에서 만들고 공유하고 Creative Commons 2.5 특성 라이선스에 설명된 용어에 따라 사용되는 작업을 기반으로 하는 수정 사항입니다.

적용 대상