diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index c839cbf3..889e125e 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -20,6 +20,14 @@
+
+
+
+
+
+
diff --git a/feature/home/src/main/kotlin/uk/govuk/app/home/ui/navigation/HomeNavigation.kt b/feature/home/src/main/kotlin/uk/govuk/app/home/ui/navigation/HomeNavigation.kt
index b4b86deb..87970488 100644
--- a/feature/home/src/main/kotlin/uk/govuk/app/home/ui/navigation/HomeNavigation.kt
+++ b/feature/home/src/main/kotlin/uk/govuk/app/home/ui/navigation/HomeNavigation.kt
@@ -1,7 +1,9 @@
package uk.govuk.app.home.ui.navigation
+import android.content.Intent
import androidx.navigation.NavGraphBuilder
import androidx.navigation.compose.composable
+import androidx.navigation.navDeepLink
import androidx.navigation.navigation
import uk.govuk.app.home.ui.HomeRoute
@@ -13,6 +15,13 @@ fun NavGraphBuilder.homeGraph() {
route = HOME_GRAPH_ROUTE,
startDestination = HOME_ROUTE
) {
- composable(HOME_ROUTE) { HomeRoute() }
+ composable(HOME_ROUTE,
+ deepLinks = listOf(
+ navDeepLink {
+ uriPattern = "/home"
+ action = Intent.ACTION_VIEW
+ }
+ )
+ ) { HomeRoute() }
}
}
diff --git a/feature/settings/src/main/kotlin/uk/govuk/app/settings/ui/navigation/SettingsNavigation.kt b/feature/settings/src/main/kotlin/uk/govuk/app/settings/ui/navigation/SettingsNavigation.kt
index 211a971a..278ece47 100644
--- a/feature/settings/src/main/kotlin/uk/govuk/app/settings/ui/navigation/SettingsNavigation.kt
+++ b/feature/settings/src/main/kotlin/uk/govuk/app/settings/ui/navigation/SettingsNavigation.kt
@@ -1,8 +1,10 @@
package uk.govuk.app.settings.ui.navigation
+import android.content.Intent
import androidx.navigation.NavController
import androidx.navigation.NavGraphBuilder
import androidx.navigation.compose.composable
+import androidx.navigation.navDeepLink
import androidx.navigation.navigation
import uk.govuk.app.settings.ui.SettingsRoute
import uk.govuk.app.settings.ui.SettingsSubRoute
@@ -16,12 +18,26 @@ fun NavGraphBuilder.settingsGraph(navController: NavController) {
route = SETTINGS_GRAPH_ROUTE,
startDestination = SETTINGS_ROUTE
) {
- composable(SETTINGS_ROUTE) {
+ composable(SETTINGS_ROUTE,
+ deepLinks = listOf(
+ navDeepLink {
+ uriPattern = "/settings"
+ action = Intent.ACTION_VIEW
+ }
+ )
+ ) {
SettingsRoute {
navController.navigateToSettingsSubScreen()
}
}
- composable(SETTINGS_SUB_ROUTE) { SettingsSubRoute() }
+ composable(SETTINGS_SUB_ROUTE,
+ deepLinks = listOf(
+ navDeepLink {
+ uriPattern = "/subroute"
+ action = Intent.ACTION_VIEW
+ }
+ )
+ ) { SettingsSubRoute() }
}
}