# 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)

*** ** * ** ***


```
@NavDestination.ClassType(value = Activity)
public class ActivityNavigator.Destination extends NavDestination
```

<br />

|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) |||
| ↳ | [androidx.navigation.NavDestination](https://developer.android.com/reference/androidx/navigation/NavDestination) ||
|   | ↳ | [androidx.navigation.ActivityNavigator.Destination](https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination) |

Known direct subclasses [DynamicActivityNavigator.Destination](https://developer.android.com/reference/androidx/navigation/dynamicfeatures/DynamicActivityNavigator.Destination)

|---|---|
| `https://developer.android.com/reference/androidx/navigation/dynamicfeatures/DynamicActivityNavigator.Destination` | Destination for `https://developer.android.com/reference/androidx/navigation/dynamicfeatures/DynamicActivityNavigator`. |

*** ** * ** ***

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/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/androidx/navigation/ActivityNavigator.Destination#Destination(androidx.navigation.Navigator)( @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/Navigator<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination> activityNavigator )` |
| `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#Destination(androidx.navigation.NavigatorProvider)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavigatorProvider navigatorProvider)` Construct a new activity destination. |

| ### Public methods |
|---|---|
| `boolean` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#equals(kotlin.Any)(https://developer.android.com/reference/java/lang/Object.html other)` |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#getAction()()` The action used to start the Activity, if any |
| `final https://developer.android.com/reference/android/content/ComponentName.html` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#getComponent()()` The explicit `https://developer.android.com/reference/android/content/ComponentName.html` associated with this destination, if any |
| `final https://developer.android.com/reference/android/net/Uri.html` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#getData()()` The data URI used to start the Activity, if any |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#getDataPattern()()` The dynamic data URI pattern, if any |
| `final https://developer.android.com/reference/android/content/Intent.html` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#getIntent()()` The Intent associated with this destination. |
| `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#getTargetPackage()()` The explicit application package name associated with this destination, if any |
| `int` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#hashCode()()` |
| `void` | `@https://developer.android.com/reference/androidx/annotation/CallSuper https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#onInflate(android.content.Context,android.util.AttributeSet)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/util/AttributeSet.html attrs)` Called when inflating a destination from a resource. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#setAction(kotlin.String)(https://developer.android.com/reference/java/lang/String.html action)` Sets the action sent when navigating to this destination. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#setComponentName(android.content.ComponentName)(https://developer.android.com/reference/android/content/ComponentName.html name)` Set an explicit `https://developer.android.com/reference/android/content/ComponentName.html` to navigate to. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#setData(android.net.Uri)(https://developer.android.com/reference/android/net/Uri.html data)` Sets a static data URI that is sent when navigating to this destination. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#setDataPattern(kotlin.String)(https://developer.android.com/reference/java/lang/String.html dataPattern)` Sets a dynamic data URI pattern that is sent when navigating to this destination. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#setIntent(android.content.Intent)(https://developer.android.com/reference/android/content/Intent.html intent)` Set the Intent to start when navigating to this destination. |
| `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#setTargetPackage(kotlin.String)(https://developer.android.com/reference/java/lang/String.html packageName)` Set an explicit application package name that limits the components this destination will navigate to. |
| `@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination#toString()()` |

| ### Inherited methods |
|---|
| From [androidx.navigation.NavDestination](https://developer.android.com/reference/androidx/navigation/NavDestination) |---|---| | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#addArgument(kotlin.String,androidx.navigation.NavArgument)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html argumentName, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavArgument argument)` Sets an argument type for an argument name | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#addDeepLink(androidx.navigation.NavDeepLink)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavDeepLink navDeepLink)` Add a deep link to this destination. | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#addDeepLink(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html uriPattern)` Add a deep link to this destination. | | `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/navigation/NavDestination#fillInLabel(android.content.Context,android.os.Bundle)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/content/Context.html context, https://developer.android.com/reference/android/os/Bundle.html bundle)` Parses a dynamic label containing arguments into a String. | | `final https://developer.android.com/reference/androidx/navigation/NavAction` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getAction(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/IdRes int id)` Returns the `https://developer.android.com/reference/androidx/navigation/NavAction` for the given action ID. | | `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/util/Map.html<@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavArgument>` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getArguments()()` The arguments supported by this destination. | | `final @https://developer.android.com/reference/androidx/annotation/IdRes int` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getId()()` The destination's unique ID. | | `final https://developer.android.com/reference/java/lang/CharSequence.html` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getLabel()()` The descriptive label of this destination. | | `final @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getNavigatorName()()` The name associated with this destination's `https://developer.android.com/reference/androidx/navigation/Navigator`. | | `final https://developer.android.com/reference/androidx/navigation/NavGraph` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getParent()()` Gets the `https://developer.android.com/reference/androidx/navigation/NavGraph` that contains this destination. | | `final https://developer.android.com/reference/java/lang/String.html` | `https://developer.android.com/reference/androidx/navigation/NavDestination#getRoute()()` The destination's unique route. | | `boolean` | `https://developer.android.com/reference/androidx/navigation/NavDestination#hasDeepLink(androidx.navigation.NavDeepLinkRequest)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavDeepLinkRequest deepLinkRequest)` Checks the given `https://developer.android.com/reference/androidx/navigation/NavDeepLinkRequest`, and determines whether it matches a `https://developer.android.com/reference/androidx/navigation/NavDeepLink` added to the destination by a call to `https://developer.android.com/reference/androidx/navigation/NavDestination#addDeepLink(kotlin.String)`. | | `boolean` | `https://developer.android.com/reference/androidx/navigation/NavDestination#hasDeepLink(android.net.Uri)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/android/net/Uri.html deepLink)` Checks the given deep link `https://developer.android.com/reference/androidx/navigation/NavUri`, and determines whether it matches a Uri pattern added to the destination by a call to `https://developer.android.com/reference/androidx/navigation/NavDestination#addDeepLink(kotlin.String)` . | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#putAction(kotlin.Int,androidx.navigation.NavAction)(@https://developer.android.com/reference/androidx/annotation/IdRes int actionId, @https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/NavAction action)` Sets the `https://developer.android.com/reference/androidx/navigation/NavAction` destination for an action ID. | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#putAction(kotlin.Int,kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/IdRes int actionId, @https://developer.android.com/reference/androidx/annotation/IdRes int destId)` Creates a `https://developer.android.com/reference/androidx/navigation/NavAction` for the given `https://developer.android.com/reference/androidx/navigation/NavDestination#putAction(kotlin.Int,kotlin.Int)` and associates it with the `https://developer.android.com/reference/androidx/navigation/NavDestination#putAction(kotlin.Int,kotlin.Int)`. | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#removeAction(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/IdRes int actionId)` Unsets the `https://developer.android.com/reference/androidx/navigation/NavAction` for an action ID. | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#removeArgument(kotlin.String)(@https://developer.android.com/reference/androidx/annotation/NonNull https://developer.android.com/reference/java/lang/String.html argumentName)` Unsets the argument type for an argument name. | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#setId(kotlin.Int)(@https://developer.android.com/reference/androidx/annotation/IdRes int value)` The destination's unique ID. | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#setLabel(kotlin.CharSequence)(https://developer.android.com/reference/java/lang/CharSequence.html value)` The descriptive label of this destination. | | `final void` | `https://developer.android.com/reference/androidx/navigation/NavDestination#setRoute(kotlin.String)(https://developer.android.com/reference/java/lang/String.html <set-?>)` The destination's unique route. | |

## Public constructors

### Destination

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

```
public Destination(
    @NonNull Navigator<@NonNull ActivityNavigator.Destination> activityNavigator
)
```

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

### Destination

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

```
public Destination(@NonNull NavigatorProvider navigatorProvider)
```

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

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

## Public methods

### equals

```
public boolean equals(Object other)
```

### getAction

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

```
public final String getAction()
```

The action used to start the Activity, if any

### getComponent

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

```
public final ComponentName getComponent()
```

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

### getData

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

```
public final Uri getData()
```

The data URI used to start the Activity, if any

### getDataPattern

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

```
public final String getDataPattern()
```

The dynamic data URI pattern, if any

### getIntent

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

```
public final Intent getIntent()
```

The Intent associated with this destination.

### getTargetPackage

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

```
public final String getTargetPackage()
```

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

### hashCode

```
public int hashCode()
```

### onInflate

```
@CallSuper
public void onInflate(@NonNull Context context, @NonNull AttributeSet attrs)
```

Called when inflating a destination from a resource.

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

### setAction

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

```
public final @NonNull ActivityNavigator.Destination setAction(String action)
```

Sets the action sent when navigating to this destination.

| Parameters |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html action` | The action string to use. |

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

### setComponentName

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

```
public final @NonNull ActivityNavigator.Destination setComponentName(ComponentName name)
```

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

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

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

### setData

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

```
public final @NonNull ActivityNavigator.Destination setData(Uri data)
```

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/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 |
|---|---|
| `https://developer.android.com/reference/android/net/Uri.html data` | A static URI that should always be used. |

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

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

### setDataPattern

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

```
public final @NonNull ActivityNavigator.Destination setDataPattern(String dataPattern)
```

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 |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html dataPattern` | 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/androidx/annotation/NonNull https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination` | this `https://developer.android.com/reference/androidx/navigation/ActivityNavigator.Destination` |

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

### setIntent

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

```
public final @NonNull ActivityNavigator.Destination setIntent(Intent intent)
```

Set the Intent to start when navigating to this destination.

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

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

### setTargetPackage

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

```
public final @NonNull ActivityNavigator.Destination setTargetPackage(String packageName)
```

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 |
|---|---|
| `https://developer.android.com/reference/java/lang/String.html packageName` | packageName to set |

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

### toString

```
public @NonNull String toString()
```