# ActivityNavigator.Destination

Artifact: [androidx.navigation:navigation-runtime](https://developer.android.com/jetpack/androidx/releases/navigation) [View Source](https://cs.android.com/search?q=file:androidx/navigation/ActivityNavigator.android.kt+class:androidx.navigation.ActivityNavigator.Destination) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigation#1.0.0)

*** ** * ** ***

Kotlin \|[Java](https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination "View this page in Java") Common/AllAndroid/JVMJavaScript
- android

  ```
  @NavDestination.ClassType(value = Activity)
  open class ActivityNavigator.Destination : NavDestination
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.navigation.NavDestination](https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination) ||
|   | ↳ | [androidx.navigation.ActivityNavigator.Destination](https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination) |

*** ** * ** ***

NavDestination for activity navigation

Construct a new activity destination. This destination is not valid until you set the Intent via `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#setIntent(android.content.Intent)` or one or more of the other set method.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#Destination(androidx.navigation.Navigator)( activityNavigator: https://developer.android.com/reference/kotlin/androidx/navigation/Navigator<https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination> )` | android |
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#Destination(androidx.navigation.NavigatorProvider)(navigatorProvider: https://developer.android.com/reference/kotlin/androidx/navigation/NavigatorProvider)` Construct a new activity destination. | android |

| ### Public functions |
|---|---|---|
| `open operator https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#equals(kotlin.Any)(other: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?)` | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#hashCode()()` | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/CallSuper https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#onInflate(android.content.Context,android.util.AttributeSet)(context: https://developer.android.com/reference/android/content/Context.html, attrs: https://developer.android.com/reference/android/util/AttributeSet.html)` Called when inflating a destination from a resource. | android |
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#setAction(kotlin.String)(action: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Sets the action sent when navigating to this destination. | android |
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#setComponentName(android.content.ComponentName)(name: https://developer.android.com/reference/android/content/ComponentName.html?)` Set an explicit `https://developer.android.com/reference/android/content/ComponentName.html` to navigate to. | android |
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#setData(android.net.Uri)(data: https://developer.android.com/reference/android/net/Uri.html?)` Sets a static data URI that is sent when navigating to this destination. | android |
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#setDataPattern(kotlin.String)(dataPattern: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Sets a dynamic data URI pattern that is sent when navigating to this destination. | android |
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#setIntent(android.content.Intent)(intent: https://developer.android.com/reference/android/content/Intent.html?)` Set the Intent to start when navigating to this destination. | android |
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#setTargetPackage(kotlin.String)(packageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?)` Set an explicit application package name that limits the components this destination will navigate to. | android |
| `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#toString()()` | android |

| ### Public properties |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#action()` The action used to start the Activity, if any | android |
| `https://developer.android.com/reference/android/content/ComponentName.html?` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#component()` The explicit `https://developer.android.com/reference/android/content/ComponentName.html` associated with this destination, if any | android |
| `https://developer.android.com/reference/android/net/Uri.html?` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#data()` The data URI used to start the Activity, if any | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#dataPattern()` The dynamic data URI pattern, if any | android |
| `https://developer.android.com/reference/android/content/Intent.html?` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#intent()` The Intent associated with this destination. | android |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#targetPackage()` The explicit application package name associated with this destination, if any | android |

| ### Inherited functions |
|---|
| From [androidx.navigation.NavDestination](https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination) |---|---|---| | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#addArgument(kotlin.String,androidx.navigation.NavArgument)(argumentName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, argument: https://developer.android.com/reference/kotlin/androidx/navigation/NavArgument)` Sets an argument type for an argument name | android | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#addDeepLink(androidx.navigation.NavDeepLink)(navDeepLink: https://developer.android.com/reference/kotlin/androidx/navigation/NavDeepLink)` Add a deep link to this destination. | android | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#addDeepLink(kotlin.String)(uriPattern: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Add a deep link to this destination. | android | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#fillInLabel(android.content.Context,android.os.Bundle)(context: https://developer.android.com/reference/android/content/Context.html, bundle: https://developer.android.com/reference/android/os/Bundle.html?)` Parses a dynamic label containing arguments into a String. | android | | `https://developer.android.com/reference/kotlin/androidx/navigation/NavAction?` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#getAction(kotlin.Int)(id: @https://developer.android.com/reference/kotlin/androidx/annotation/IdRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Returns the `https://developer.android.com/reference/kotlin/androidx/navigation/NavAction` for the given action ID. | android | | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#hasDeepLink(androidx.navigation.NavDeepLinkRequest)(deepLinkRequest: https://developer.android.com/reference/kotlin/androidx/navigation/NavDeepLinkRequest)` Checks the given `https://developer.android.com/reference/kotlin/androidx/navigation/NavDeepLinkRequest`, and determines whether it matches a `https://developer.android.com/reference/kotlin/androidx/navigation/NavDeepLink` added to the destination by a call to `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#addDeepLink(kotlin.String)`. | android | | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#hasDeepLink(android.net.Uri)(deepLink: https://developer.android.com/reference/android/net/Uri.html)` Checks the given deep link `https://developer.android.com/reference/kotlin/androidx/navigation/NavUri`, and determines whether it matches a Uri pattern added to the destination by a call to `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#addDeepLink(kotlin.String)` . | android | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#putAction(kotlin.Int,androidx.navigation.NavAction)(actionId: @https://developer.android.com/reference/kotlin/androidx/annotation/IdRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, action: https://developer.android.com/reference/kotlin/androidx/navigation/NavAction)` Sets the `https://developer.android.com/reference/kotlin/androidx/navigation/NavAction` destination for an action ID. | android | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#putAction(kotlin.Int,kotlin.Int)(actionId: @https://developer.android.com/reference/kotlin/androidx/annotation/IdRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html, destId: @https://developer.android.com/reference/kotlin/androidx/annotation/IdRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Creates a `https://developer.android.com/reference/kotlin/androidx/navigation/NavAction` for the given `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#putAction(kotlin.Int,kotlin.Int)` and associates it with the `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#putAction(kotlin.Int,kotlin.Int)`. | android | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#removeAction(kotlin.Int)(actionId: @https://developer.android.com/reference/kotlin/androidx/annotation/IdRes https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)` Unsets the `https://developer.android.com/reference/kotlin/androidx/navigation/NavAction` for an action ID. | android | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#removeArgument(kotlin.String)(argumentName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)` Unsets the argument type for an argument name. | android | |

| ### Inherited properties |
|---|
| From [androidx.navigation.NavDestination](https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination) |---|---|---| | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-map/index.html<https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html, https://developer.android.com/reference/kotlin/androidx/navigation/NavArgument>` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#arguments()` The arguments supported by this destination. | android | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#id()` The destination's unique ID. | android | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-char-sequence/index.html?` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#label()` The descriptive label of this destination. | android | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#navigatorName()` The name associated with this destination's `https://developer.android.com/reference/kotlin/androidx/navigation/Navigator`. | android | | `https://developer.android.com/reference/kotlin/androidx/navigation/NavGraph?` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#parent()` Gets the `https://developer.android.com/reference/kotlin/androidx/navigation/NavGraph` that contains this destination. | android | | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | `https://developer.android.com/reference/kotlin/androidx/navigation/NavDestination#route()` The destination's unique route. | android | |

## Public constructors

### Destination

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

```
Destination(
    activityNavigator: Navigator<ActivityNavigator.Destination>
)
```

| Parameters |
|---|---|
| `activityNavigator: https://developer.android.com/reference/kotlin/androidx/navigation/Navigator<https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination>` | The `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator` which this destination will be associated with. Generally retrieved via a `https://developer.android.com/reference/kotlin/androidx/navigation/NavController`'s `https://developer.android.com/reference/kotlin/androidx/navigation/NavigatorProvider#getNavigator(java.lang.Class)` method. |

### Destination

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

```
Destination(navigatorProvider: NavigatorProvider)
```

Construct a new activity destination. This destination is not valid until you set the Intent via `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#setIntent(android.content.Intent)` or one or more of the other set method.

| Parameters |
|---|---|
| `navigatorProvider: https://developer.android.com/reference/kotlin/androidx/navigation/NavigatorProvider` | The `https://developer.android.com/reference/kotlin/androidx/navigation/NavController` which this destination will be associated with. |

## Public functions

### equals

android

```
open operator fun equals(other: Any?): Boolean
```

### hashCode

android

```
open fun hashCode(): Int
```

### onInflate

android

```
@CallSuper
open fun onInflate(context: Context, attrs: AttributeSet): Unit
```

Called when inflating a destination from a resource.

| Parameters |
|---|---|
| `context: https://developer.android.com/reference/android/content/Context.html` | local context performing inflation |
| `attrs: https://developer.android.com/reference/android/util/AttributeSet.html` | attrs to parse during inflation |

### setAction

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

```
fun setAction(action: String?): ActivityNavigator.Destination
```

Sets the action sent when navigating to this destination.

| Parameters |
|---|---|
| `action: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | The action string to use. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` | this `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` |

### setComponentName

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

```
fun setComponentName(name: ComponentName?): ActivityNavigator.Destination
```

Set an explicit `https://developer.android.com/reference/android/content/ComponentName.html` to navigate to.

| Parameters |
|---|---|
| `name: https://developer.android.com/reference/android/content/ComponentName.html?` | The component name of the Activity to start. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` | this `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` |

### setData

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

```
fun setData(data: Uri?): ActivityNavigator.Destination
```

Sets a static data URI that is sent when navigating to this destination.

To use a dynamic URI that changes based on the arguments passed in when navigating, use `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#setDataPattern(kotlin.String)`, which will take precedence when arguments are present.

When inflated from XML, you can use `${applicationId}` for string interpolation to automatically use `https://developer.android.com/reference/android/content/Context.html#getPackageName()`.

| Parameters |
|---|---|
| `data: https://developer.android.com/reference/android/net/Uri.html?` | A static URI that should always be used. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` | this `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#setDataPattern(kotlin.String)` |   |

### setDataPattern

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

```
fun setDataPattern(dataPattern: String?): ActivityNavigator.Destination
```

Sets a dynamic data URI pattern that is sent when navigating to this destination.

If a non-null arguments Bundle is present when navigating, any segments in the form `{argName}` will be replaced with a URI encoded string from the arguments.

When inflated from XML, you can use `${applicationId}` as an argument pattern to automatically use `https://developer.android.com/reference/android/content/Context.html#getPackageName()`.

| Parameters |
|---|---|
| `dataPattern: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | A URI pattern with segments in the form of `{argName}` that will be replaced with URI encoded versions of the Strings in the arguments Bundle. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` | this `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` |

| See also |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination#setData(android.net.Uri)` |   |

### setIntent

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

```
fun setIntent(intent: Intent?): ActivityNavigator.Destination
```

Set the Intent to start when navigating to this destination.

| Parameters |
|---|---|
| `intent: https://developer.android.com/reference/android/content/Intent.html?` | Intent to associated with this destination. |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` | this `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` |

### setTargetPackage

android Added in [2.1.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.1.0)

```
fun setTargetPackage(packageName: String?): ActivityNavigator.Destination
```

Set an explicit application package name that limits the components this destination will navigate to.

When inflated from XML, you can use `${applicationId}` as the package name to automatically use `https://developer.android.com/reference/android/content/Context.html#getPackageName()`.

| Parameters |
|---|---|
| `packageName: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html?` | packageName to set |

| Returns |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` | this `https://developer.android.com/reference/kotlin/androidx/navigation/ActivityNavigator.Destination` |

### toString

android

```
open fun toString(): String
```

## Public properties

### action

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

```
val action: String?
```

The action used to start the Activity, if any

### component

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

```
val component: ComponentName?
```

The explicit `https://developer.android.com/reference/android/content/ComponentName.html` associated with this destination, if any

### data

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

```
val data: Uri?
```

The data URI used to start the Activity, if any

### dataPattern

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

```
val dataPattern: String?
```

The dynamic data URI pattern, if any

### intent

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

```
val intent: Intent?
```

The Intent associated with this destination.

### targetPackage

android Added in [2.1.0](https://developer.android.com/jetpack/androidx/releases/navigation#2.1.0)

```
val targetPackage: String?
```

The explicit application package name associated with this destination, if any