# HandshakeInfo

Artifact: [androidx.car.app:app](https://developer.android.com/jetpack/androidx/releases/car-app) [View Source](https://cs.android.com/search?q=file:androidx/car/app/HandshakeInfo.java+class:androidx.car.app.HandshakeInfo) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

*** ** * ** ***


```
@CarProtocol
class HandshakeInfo
```

<br />

*** ** * ** ***

A container for the information conveyed by the host after the handshake with the app is completed.

## Summary

| ### Public constructors |
|---|
| `https://developer.android.com/reference/kotlin/androidx/car/app/HandshakeInfo#HandshakeInfo(java.lang.String,int)(hostPackageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, hostCarAppApiLevel: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Creates an instance of `https://developer.android.com/reference/kotlin/androidx/car/app/HandshakeInfo`. |

| ### Public functions |
|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/HandshakeInfo#getHostCarAppApiLevel()()` Returns the negotiated API level that should be used to communicate with the host. |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/car/app/HandshakeInfo#getHostPackageName()()` Returns the host package name. |

## Public constructors

### HandshakeInfo

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

```
HandshakeInfo(hostPackageName: String, hostCarAppApiLevel: Int)
```

Creates an instance of `https://developer.android.com/reference/kotlin/androidx/car/app/HandshakeInfo`.

| Parameters |
|---|---|
| `hostPackageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | the host package name |
| `hostCarAppApiLevel: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | the API level that should be used to communicate with the host |

## Public functions

### getHostCarAppApiLevel

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

```
fun getHostCarAppApiLevel(): Int
```

Returns the negotiated API level that should be used to communicate with the host.

### getHostPackageName

Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/car-app#1.0.0)

```
fun getHostPackageName(): String
```

Returns the host package name.