{"id":258,"date":"2026-10-24T03:08:00","date_gmt":"2026-10-24T03:08:00","guid":{"rendered":"https:\/\/moiks.com\/blog\/?p=258"},"modified":"2026-11-06T08:48:13","modified_gmt":"2026-11-06T08:48:13","slug":"android-app-links-deep-links-with-kotlin-and-jetpack-compose-navigation-verification-security","status":"publish","type":"post","link":"https:\/\/moiks.com\/blog\/android-app-links-deep-links-with-kotlin-and-jetpack-compose-navigation-verification-security\/","title":{"rendered":"Android App Links &#038; Deep Links with Kotlin and Jetpack Compose: Navigation, Verification &#038; Security"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Modern Android applications need to connect seamlessly with websites, browsers, notifications, emails, and other applications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, when a user taps a product URL, the Android application should be able to open the corresponding product screen directly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Similarly, a notification can take users to a specific article, order, or account page instead of always opening the home screen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Android supports these experiences through <strong>deep links and Android App Links<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Deep links allow applications to respond to specific URI patterns.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Android App Links extend this capability by using verified HTTPS URLs associated with an application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this tutorial, we&#8217;ll learn how to implement deep links and verified Android App Links using <strong>Kotlin, Jetpack Compose, Navigation Compose, AndroidManifest intent filters, and Digital Asset Links<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We&#8217;ll also build a practical deep-link navigation demo and discuss important security considerations.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">1. What Are Deep Links in Android?<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">A deep link is a URI that opens a specific destination inside an application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead of launching only the main screen, a deep link can navigate directly to relevant content.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/articles\/123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This URL could open an article detail screen displaying article 123.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>myapp:\/\/products\/456<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This custom URI could open a product detail screen.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Common Use Cases<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Product detail pages.<\/li>\n\n\n\n<li>News articles.<\/li>\n\n\n\n<li>Blog posts.<\/li>\n\n\n\n<li>Order tracking.<\/li>\n\n\n\n<li>Password reset flows.<\/li>\n\n\n\n<li>Email verification.<\/li>\n\n\n\n<li>Marketing campaigns.<\/li>\n\n\n\n<li>Push notification navigation.<\/li>\n\n\n\n<li>Shared content.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Deep links improve navigation by reducing the steps required to reach specific content.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Types of Android Deep Links<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Android applications commonly support three related linking approaches.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><th>Type<\/th><th>Example<\/th><th>Description<\/th><\/tr><tr><td>Custom scheme<\/td><td><code>myapp:\/\/products\/123<\/code><\/td><td>Application-defined URI scheme<\/td><\/tr><tr><td>Web deep link<\/td><td><code>https:\/\/example.com\/products\/123<\/code><\/td><td>HTTP or HTTPS URL handled by an app<\/td><\/tr><tr><td>Verified Android App Link<\/td><td><code>https:\/\/example.com\/products\/123<\/code><\/td><td>HTTPS URL associated with an app through domain verification<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Custom Scheme<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Custom schemes are easy to define but are not globally unique.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Another application may register the same scheme.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Therefore, custom schemes should not be treated as proof of a trusted caller.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Web Deep Link<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A web deep link uses an HTTP or HTTPS URL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Android may offer the user different applications or a browser depending on system settings and link handling.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Verified Android App Link<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">An Android App Link uses HTTPS and domain verification to associate a website with an Android application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On supported Android versions and configurations, verified links can open directly in the associated application.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. Deep Links vs Android App Links<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Although they are related, deep links and Android App Links are not identical.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Deep Links<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Can use custom URI schemes.<\/li>\n\n\n\n<li>Can use HTTP or HTTPS.<\/li>\n\n\n\n<li>Do not necessarily require domain verification.<\/li>\n\n\n\n<li>May result in application selection behavior.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Android App Links<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use HTTP or HTTPS URLs, normally HTTPS for production.<\/li>\n\n\n\n<li>Require domain association verification.<\/li>\n\n\n\n<li>Use Digital Asset Links.<\/li>\n\n\n\n<li>Support direct opening of verified website links.<\/li>\n\n\n\n<li>Depend on installed application and user link-handling preferences.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Recommendation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">For public website URLs that should open in your Android application, prefer <strong>verified Android App Links<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Custom schemes may still be appropriate for specific integrations, but they require careful security handling.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. How Android App Links Work<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Android App Links connect a website and an Android application through domain verification.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Simplified Architecture<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>User Taps HTTPS Link\n          |\n          v\nAndroid Link Resolver\n          |\n          v\nVerified Domain Association\n          |\n          v\nAndroid Application\n          |\n          v\nDeep Link Navigation\n          |\n          v\nTarget Screen<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The website publishes a Digital Asset Links file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Android application declares matching URL patterns in its manifest.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Android verifies the relationship between the website and the application&#8217;s signing certificate.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When verification and user settings permit, supported links can open directly in the application.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. Add Navigation Compose Dependency<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Navigation Compose provides navigation support for Jetpack Compose applications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Add the dependency to your app-level <code>build.gradle.kts<\/code>.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dependencies {\n\n    implementation(\n        \"androidx.navigation:navigation-compose:&lt;version&gt;\"\n    )\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Replace <code>&lt;version&gt;<\/code> with a compatible stable AndroidX Navigation version.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the examples below, we&#8217;ll use the familiar string-route Navigation Compose APIs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Newer Navigation versions also provide type-safe navigation APIs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Both approaches can support deep-link navigation when configured correctly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">6. Create a Basic Navigation Compose Application<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s create an application with two screens:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Home screen.<\/li>\n\n\n\n<li>Article detail screen.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Main Activity<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>class MainActivity : ComponentActivity() {\n\n    override fun onCreate(\n        savedInstanceState: Bundle?\n    ) {\n        super.onCreate(savedInstanceState)\n\n        setContent {\n            MaterialTheme {\n                AppNavigation()\n            }\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Navigation Graph<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>@Composable\nfun AppNavigation() {\n\n    val navController =\n        rememberNavController()\n\n    NavHost(\n        navController = navController,\n        startDestination = \"home\"\n    ) {\n\n        composable(\"home\") {\n            HomeScreen(\n                onOpenArticle = { articleId -&gt;\n\n                    navController.navigate(\n                        \"article\/$articleId\"\n                    )\n                }\n            )\n        }\n\n        composable(\n            route = \"article\/{articleId}\",\n            arguments = listOf(\n                navArgument(\"articleId\") {\n                    type = NavType.StringType\n                }\n            )\n        ) { backStackEntry -&gt;\n\n            val articleId =\n                backStackEntry.arguments\n                    ?.getString(\"articleId\")\n                    .orEmpty()\n\n            ArticleDetailScreen(\n                articleId = articleId\n            )\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">How It Works<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The navigation graph defines destinations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The home screen can navigate to an article using its ID.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The detail screen reads the ID from the navigation arguments.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In production, validate the identifier and load the corresponding article through a ViewModel or repository.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">7. Create the Home Screen<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>@Composable\nfun HomeScreen(\n    onOpenArticle: (String) -&gt; Unit\n) {\n\n    Column(\n        modifier = Modifier\n            .fillMaxSize()\n            .padding(24.dp),\n        verticalArrangement =\n            Arrangement.spacedBy(16.dp)\n    ) {\n\n        Text(\n            text = \"Developer Articles\",\n            style =\n                MaterialTheme.typography\n                    .headlineMedium\n        )\n\n        Button(\n            onClick = {\n                onOpenArticle(\"123\")\n            }\n        ) {\n            Text(\"Open Article 123\")\n        }\n\n        Button(\n            onClick = {\n                onOpenArticle(\"456\")\n            }\n        ) {\n            Text(\"Open Article 456\")\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This screen provides ordinary in-app navigation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Next, we&#8217;ll connect external URLs to the same article destination.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">8. Create the Article Detail Screen<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>@Composable\nfun ArticleDetailScreen(\n    articleId: String\n) {\n\n    Column(\n        modifier = Modifier\n            .fillMaxSize()\n            .padding(24.dp),\n        verticalArrangement =\n            Arrangement.spacedBy(16.dp)\n    ) {\n\n        Text(\n            text = \"Article Details\",\n            style =\n                MaterialTheme.typography\n                    .headlineMedium\n        )\n\n        Text(\n            text = \"Article ID: $articleId\"\n        )\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">For a production application, this screen would retrieve article content using the validated identifier.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The deep link should identify the requested resource, not contain sensitive authorization information.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">9. Configure Deep Links in Navigation Compose<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Navigation Compose supports deep-link declarations for destinations.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s map the following URL:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/articles\/123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">to the article detail screen.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>composable(\n    route = \"article\/{articleId}\",\n    arguments = listOf(\n        navArgument(\"articleId\") {\n            type = NavType.StringType\n        }\n    ),\n    deepLinks = listOf(\n        navDeepLink {\n            uriPattern =\n                \"https:\/\/example.com\/articles\/{articleId}\"\n        }\n    )\n) { backStackEntry -&gt;\n\n    val articleId =\n        backStackEntry.arguments\n            ?.getString(\"articleId\")\n            .orEmpty()\n\n    ArticleDetailScreen(\n        articleId = articleId\n    )\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Important Note<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Declaring a deep link in Navigation Compose does not automatically make it externally accessible.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Activity must also declare an appropriate intent filter in the Android manifest.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">10. Configure AndroidManifest Intent Filters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Android uses intent filters to determine which applications can handle specific links.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&lt;activity\n    android:name=\".MainActivity\"\n    android:exported=\"true\"&gt;\n\n    &lt;intent-filter&gt;\n        &lt;action\n            android:name=\"android.intent.action.MAIN\" \/&gt;\n\n        &lt;category\n            android:name=\"android.intent.category.LAUNCHER\" \/&gt;\n    &lt;\/intent-filter&gt;\n\n    &lt;intent-filter android:autoVerify=\"true\"&gt;\n\n        &lt;action\n            android:name=\"android.intent.action.VIEW\" \/&gt;\n\n        &lt;category\n            android:name=\"android.intent.category.DEFAULT\" \/&gt;\n\n        &lt;category\n            android:name=\"android.intent.category.BROWSABLE\" \/&gt;\n\n        &lt;data\n            android:scheme=\"https\"\n            android:host=\"example.com\"\n            android:pathPrefix=\"\/articles\/\" \/&gt;\n\n    &lt;\/intent-filter&gt;\n\n&lt;\/activity&gt;<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Important Attributes<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>android<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Requests Android App Links domain verification.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>android<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Defines the URI scheme.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>android<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Defines the website domain.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>android<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Restricts matching to paths beginning with the specified prefix.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Security Recommendation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use the narrowest appropriate URL patterns.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid claiming unrelated website paths unnecessarily.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">11. Understand Digital Asset Links<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Android App Links use Digital Asset Links to verify the relationship between an Android application and a website.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The website must publish an <code>assetlinks.json<\/code> file.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Required Location<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/.well-known\/assetlinks.json<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The file must be accessible over HTTPS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;\n  {\n    \"relation\": &#91;\n      \"delegate_permission\/common.handle_all_urls\"\n    ],\n    \"target\": {\n      \"namespace\": \"android_app\",\n      \"package_name\": \"com.example.deeplinkdemo\",\n      \"sha256_cert_fingerprints\": &#91;\n        \"REPLACE_WITH_REAL_SHA256_FINGERPRINT\"\n      ]\n    }\n  }\n]<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Important Fields<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>package_name<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The Android application&#8217;s package name.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>sha256_cert_fingerprints<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The SHA-256 fingerprint of the certificate used to sign the application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>relation<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Declares the relationship between the website and application.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Important Note<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The fingerprint must match the certificate used to sign the installed application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For applications distributed through Google Play App Signing, the production fingerprint is normally the Play app-signing certificate fingerprint, not necessarily the upload certificate fingerprint.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">12. Find Your Android Signing Certificate SHA-256<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can inspect a signing certificate using <code>keytool<\/code>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>keytool -list -v \\\n  -keystore your-release-key.jks \\\n  -alias your-key-alias<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Look for the SHA-256 fingerprint.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">For Google Play Applications<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open Google Play Console and locate the application&#8217;s signing certificate information under App Integrity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the appropriate certificate fingerprint for the installed production build.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Important Consideration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Debug and release builds may use different signing certificates.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If both should verify against the same development domain, the Digital Asset Links file can include the relevant authorized fingerprints.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid exposing private signing keys or keystore passwords.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">13. Host assetlinks.json Correctly<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Digital Asset Links file must be available at the exact expected path.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/.well-known\/assetlinks.json<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Hosting Requirements<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Serve the file over HTTPS.<\/li>\n\n\n\n<li>Return valid JSON.<\/li>\n\n\n\n<li>Use an appropriate JSON content type.<\/li>\n\n\n\n<li>Avoid redirects.<\/li>\n\n\n\n<li>Make the file publicly accessible.<\/li>\n\n\n\n<li>Ensure the package name and fingerprints are correct.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Important WordPress Consideration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If your website uses WordPress, the file still needs to be available at the domain&#8217;s root <code>.well-known<\/code> path.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, a WordPress installation under <code>\/blog\/<\/code> does not change the required Digital Asset Links location.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The correct location remains:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/.well-known\/assetlinks.json<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">not:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/blog\/.well-known\/assetlinks.json<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">14. Verify Android App Links with ADB<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Android provides ADB commands to inspect domain verification.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Request Verification<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">On supported Android versions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>adb shell pm verify-app-links --re-verify \\\n  com.example.deeplinkdemo<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Inspect Verification State<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>adb shell pm get-app-links \\\n  com.example.deeplinkdemo<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Expected Result<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A correctly configured domain may appear with a verified state.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Important Note<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">ADB command behavior and available options vary across Android versions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Domain verification may also be affected by network access, package installation state, and user link-handling preferences.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">15. Test Deep Links with ADB<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can simulate opening a link using ADB.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>adb shell am start \\\n  -a android.intent.action.VIEW \\\n  -c android.intent.category.BROWSABLE \\\n  -d \"https:\/\/example.com\/articles\/123\"<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Expected Behavior<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">If the application is installed, the URL matches its configuration, and Android resolves the link to the app, the article detail screen should open.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Testing Checklist<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Test when the app is closed.<\/li>\n\n\n\n<li>Test when the app is already open.<\/li>\n\n\n\n<li>Test with an invalid article ID.<\/li>\n\n\n\n<li>Test with a missing article.<\/li>\n\n\n\n<li>Test with an unsupported URL.<\/li>\n\n\n\n<li>Test when the application is not installed.<\/li>\n\n\n\n<li>Test user link-handling preferences.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">16. Handle Deep Links When the App Is Already Running<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Deep links can arrive when an Activity already exists.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The behavior depends on Activity launch mode, task state, and intent delivery.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Navigation Compose can handle incoming deep-link intents, but developers should verify behavior for their Activity configuration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>override fun onNewIntent(\n    intent: Intent\n) {\n    super.onNewIntent(intent)\n\n    setIntent(intent)\n\n    \/\/ Forward the intent to the navigation\n    \/\/ controller if your integration requires it.\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Important Note<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The default Navigation Compose deep-link integration handles initial Activity intents.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">When using a launch mode that delivers new intents to an existing Activity, such as <code>singleTop<\/code>, the application may need to explicitly call <code>NavController.handleDeepLink(intent)<\/code>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid forwarding the same intent multiple times.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Recommended Approach<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Keep navigation handling centralized.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Test both cold-start and warm-start deep-link scenarios.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">17. Secure Deep Link Parameters<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Deep links are externally supplied input.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Applications must never assume that URL parameters are trustworthy.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/articles\/123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">An attacker can modify the article ID.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/articles\/999999<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The application must validate the requested resource.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Recommended Practices<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Validate parameter formats.<\/li>\n\n\n\n<li>Enforce length limits.<\/li>\n\n\n\n<li>Reject unsupported values.<\/li>\n\n\n\n<li>Handle missing resources safely.<\/li>\n\n\n\n<li>Avoid executing arbitrary commands from URL parameters.<\/li>\n\n\n\n<li>Do not expose internal application file paths.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Important Principle<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Deep links are navigation requests, not proof of user identity or authorization.<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">18. Protect Authenticated Destinations<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Some deep links point to private content.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/orders\/123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">A user should not gain access to another person&#8217;s order simply by changing the ID.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Secure Navigation Flow<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Incoming Deep Link\n        |\n        v\nValidate URL\n        |\n        v\nCheck Authentication\n        |\n    +---+---+\n    |       |\n    v       v\nLogged In  Logged Out\n    |       |\n    v       v\nCheck      Login Screen\nAccess         |\n    |          v\n    |      Resume Request\n    v\nOpen Authorized Content<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Important Security Rule<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The backend must verify that the authenticated user is authorized to access the requested resource.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Client-side checks improve user experience but are not sufficient for security.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">19. Avoid Sensitive Data in Deep Link URLs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">URLs may be exposed through:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Browser history.<\/li>\n\n\n\n<li>Application logs.<\/li>\n\n\n\n<li>Analytics systems.<\/li>\n\n\n\n<li>Shared messages.<\/li>\n\n\n\n<li>Referrer information.<\/li>\n\n\n\n<li>Screenshots.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid including passwords, permanent authentication tokens, or other sensitive information in deep-link URLs.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Better Approach<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use short-lived, single-use tokens for workflows such as email verification or password reset.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The backend should validate and consume these tokens securely.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Important Consideration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Even short-lived tokens must be handled carefully.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Do not log them or retain them longer than necessary.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">20. Custom Scheme Security Considerations<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Custom schemes are not verified through Android App Links domain association.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>moiksdemo:\/\/articles\/123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Another application may register the same scheme.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Risks<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Link interception.<\/li>\n\n\n\n<li>Ambiguous application resolution.<\/li>\n\n\n\n<li>Untrusted parameters.<\/li>\n\n\n\n<li>Incorrect assumptions about caller identity.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Recommendation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Prefer verified HTTPS App Links for public web content.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If custom schemes are necessary, treat all incoming data as untrusted.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">21. Handle Notification Deep Links<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Push notifications often need to open specific application screens.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, a notification may represent a new article.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Example URL<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/articles\/123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The application can use a compatible Intent to open the associated destination.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Simplified Example<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>val intent = Intent(\n    Intent.ACTION_VIEW,\n    Uri.parse(\n        \"https:\/\/example.com\/articles\/123\"\n    ),\n    context,\n    MainActivity::class.java\n)\n\nval pendingIntent =\n    PendingIntent.getActivity(\n        context,\n        100,\n        intent,\n        PendingIntent.FLAG_UPDATE_CURRENT or\n            PendingIntent.FLAG_IMMUTABLE\n    )<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Important Considerations<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use unique PendingIntent identity where required.<\/li>\n\n\n\n<li>Choose appropriate PendingIntent flags.<\/li>\n\n\n\n<li>Validate destination parameters.<\/li>\n\n\n\n<li>Handle authentication before displaying private content.<\/li>\n\n\n\n<li>Test navigation back-stack behavior.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For complex notification navigation, consider Navigation&#8217;s deep-link and task-stack support.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">22. Handle Deep Links from Emails and Browsers<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Android App Links can support links shared through multiple channels.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Examples include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Email newsletters.<\/li>\n\n\n\n<li>Website articles.<\/li>\n\n\n\n<li>Search results.<\/li>\n\n\n\n<li>Messaging applications.<\/li>\n\n\n\n<li>Social media posts.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Example<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A user receives:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/articles\/123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If the Android application is installed and the domain association is verified, Android may open the corresponding screen directly, subject to user settings and link handling.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Otherwise, the URL should remain useful in a browser.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Best Practice<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Always provide a functional web fallback for public App Links.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This ensures that users without the Android application can still access relevant content.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">23. Practical Mini Project: Deep Link Navigation Demo<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Let&#8217;s create a small Android application that supports verified article links.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Project Requirements<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The application should:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Display a home screen.<\/li>\n\n\n\n<li>Open article details.<\/li>\n\n\n\n<li>Support internal navigation.<\/li>\n\n\n\n<li>Handle external HTTPS URLs.<\/li>\n\n\n\n<li>Verify the associated website domain.<\/li>\n\n\n\n<li>Validate article identifiers.<\/li>\n\n\n\n<li>Handle missing content.<\/li>\n\n\n\n<li>Support cold-start navigation.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Architecture<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code>Browser \/ Email \/ Notification\n              |\n              v\nVerified HTTPS URL\n              |\n              v\nAndroid MainActivity\n              |\n              v\nNavigation Compose\n              |\n              v\nArticle Route\n              |\n              v\nArticleViewModel\n              |\n              v\nArticleRepository<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">24. Step 1: Create the Article Model<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>data class Article(\n    val id: String,\n    val title: String,\n    val description: String\n)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">This model represents article information.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">25. Step 2: Create the Repository<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>class ArticleRepository {\n\n    private val articles = listOf(\n        Article(\n            id = \"123\",\n            title = \"Kotlin Basics\",\n            description =\n                \"Introduction to Kotlin development\"\n        ),\n        Article(\n            id = \"456\",\n            title = \"Jetpack Compose\",\n            description =\n                \"Build modern Android interfaces\"\n        )\n    )\n\n    fun getArticle(\n        id: String\n    ): Article? {\n\n        return articles.find {\n            it.id == id\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">In a production application, the repository could load content from Room or Retrofit.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">26. Step 3: Validate Incoming Article IDs<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Create a simple validator.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>object ArticleIdValidator {\n\n    private val pattern =\n        Regex(\"^&#91;0-9]{1,10}$\")\n\n    fun isValid(id: String): Boolean {\n        return pattern.matches(id)\n    }\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Why Validation Matters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">An externally supplied ID should not be passed into sensitive operations without validation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The validation rules must match the actual resource identifier format used by the application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, UUID-based IDs require a different validation strategy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">27. Step 4: Create the Article ViewModel<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>class ArticleViewModel(\n    private val repository: ArticleRepository\n) : ViewModel() {\n\n    private val _article =\n        MutableStateFlow&lt;Article?&gt;(null)\n\n    val article =\n        _article.asStateFlow()\n\n    private val _error =\n        MutableStateFlow&lt;String?&gt;(null)\n\n    val error =\n        _error.asStateFlow()\n\n    fun loadArticle(id: String) {\n\n        if (!ArticleIdValidator.isValid(id)) {\n\n            _article.value = null\n            _error.value =\n                \"Invalid article link\"\n\n            return\n        }\n\n        val result =\n            repository.getArticle(id)\n\n        _article.value = result\n\n        _error.value =\n            if (result == null) {\n                \"Article not found\"\n            } else {\n                null\n            }\n    }\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Important Note<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The ViewModel requires an appropriate factory or dependency injection configuration when used with constructor parameters.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example, Hilt can provide the repository.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">28. Step 5: Create the Article Detail UI<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>@Composable\nfun ArticleDetailScreen(\n    article: Article?,\n    error: String?\n) {\n\n    Column(\n        modifier = Modifier\n            .fillMaxSize()\n            .padding(24.dp),\n        verticalArrangement =\n            Arrangement.spacedBy(16.dp)\n    ) {\n\n        when {\n\n            error != null -&gt; {\n                Text(error)\n            }\n\n            article != null -&gt; {\n\n                Text(\n                    text = article.title,\n                    style =\n                        MaterialTheme.typography\n                            .headlineMedium\n                )\n\n                Text(\n                    text = article.description\n                )\n            }\n\n            else -&gt; {\n                CircularProgressIndicator()\n            }\n        }\n    }\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Important Consideration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This example uses nullable state for simplicity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">A production application should preferably model loading, success, and error states explicitly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">29. Step 6: Connect Deep Links to the ViewModel<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">In the navigation destination, load the requested article when its ID changes.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>composable(\n    route = \"article\/{articleId}\",\n    arguments = listOf(\n        navArgument(\"articleId\") {\n            type = NavType.StringType\n        }\n    ),\n    deepLinks = listOf(\n        navDeepLink {\n            uriPattern =\n                \"https:\/\/example.com\/articles\/{articleId}\"\n        }\n    )\n) { backStackEntry -&gt;\n\n    val articleId =\n        backStackEntry.arguments\n            ?.getString(\"articleId\")\n            .orEmpty()\n\n    val viewModel: ArticleViewModel =\n        viewModel()\n\n    LaunchedEffect(articleId) {\n        viewModel.loadArticle(articleId)\n    }\n\n    val article by viewModel.article\n        .collectAsStateWithLifecycle()\n\n    val error by viewModel.error\n        .collectAsStateWithLifecycle()\n\n    ArticleDetailScreen(\n        article = article,\n        error = error\n    )\n}<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Important Implementation Note<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The ViewModel construction shown assumes that a compatible ViewModel factory or dependency injection setup is already configured.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For larger projects, prefer a dedicated navigation destination composable and a structured UI state model.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">30. Step 7: Test the Complete Flow<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Test the following scenarios.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Scenario 1: App Not Running<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/articles\/123<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected result: The application opens the correct article if link resolution selects the app.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Scenario 2: App Already Running<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open a different article URL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Expected result: Navigation updates to the requested article.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Scenario 3: Invalid ID<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/articles\/invalid<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected result: A clear validation error appears.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Scenario 4: Missing Article<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>https:&#47;&#47;example.com\/articles\/999<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Expected result: The application displays an article-not-found state.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Scenario 5: App Not Installed<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Open the same HTTPS URL.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Expected result: The website displays a usable article page.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Scenario 6: Verification Failure<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Remove or misconfigure the Digital Asset Links association in a test environment.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Expected result: Android may open the browser or use another resolution behavior instead of directly opening the app.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">31. Common Android Deep Link Mistakes<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 1: Forgetting the Manifest Intent Filter<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Navigation Compose deep-link declarations alone do not expose an Activity to external links.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 2: Using the Wrong Signing Certificate<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Production App Links must match the installed application&#8217;s signing identity.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 3: Hosting assetlinks.json in the Wrong Directory<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The file belongs under the domain&#8217;s root <code>.well-known<\/code> path.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 4: Using Redirects for assetlinks.json<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Serve the association file directly.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 5: Claiming Too Many URL Patterns<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Keep intent filters appropriately scoped.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 6: Trusting Incoming Parameters<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Validate all externally supplied data.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 7: Skipping Backend Authorization<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A deep link must not bypass resource access checks.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 8: Ignoring Warm-Start Behavior<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Test new intents when the application is already running.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 9: Including Sensitive Tokens in URLs<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Avoid unnecessary exposure of credentials or personal information.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Mistake 10: Forgetting Browser Fallback<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Public HTTPS links should remain useful when the app is unavailable.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">32. Android App Links Checklist<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before releasing an Android application, verify the following:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Use HTTPS for production App Links.<\/li>\n\n\n\n<li>Configure matching manifest intent filters.<\/li>\n\n\n\n<li>Set <code>android:autoVerify=\"true\"<\/code> where appropriate.<\/li>\n\n\n\n<li>Publish <code>assetlinks.json<\/code> at the correct root path.<\/li>\n\n\n\n<li>Use the correct package name.<\/li>\n\n\n\n<li>Use the correct app-signing SHA-256 fingerprint.<\/li>\n\n\n\n<li>Serve the association file without redirects.<\/li>\n\n\n\n<li>Configure matching Navigation Compose destinations.<\/li>\n\n\n\n<li>Validate incoming URI parameters.<\/li>\n\n\n\n<li>Enforce authentication for private destinations.<\/li>\n\n\n\n<li>Enforce backend authorization.<\/li>\n\n\n\n<li>Avoid sensitive information in URLs.<\/li>\n\n\n\n<li>Test cold-start deep links.<\/li>\n\n\n\n<li>Test warm-start deep links.<\/li>\n\n\n\n<li>Test unsupported and malformed URLs.<\/li>\n\n\n\n<li>Test missing content.<\/li>\n\n\n\n<li>Test app-not-installed behavior.<\/li>\n\n\n\n<li>Verify domain state with ADB.<\/li>\n\n\n\n<li>Test on supported Android versions.<\/li>\n\n\n\n<li>Provide a functional web fallback.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">33. Frequently Asked Questions<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">What is a deep link in Android?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">A deep link is a URI that opens a specific destination inside an Android application.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is an Android App Link?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">An Android App Link is an HTTP or HTTPS link associated with an Android application through domain verification.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is the difference between deep links and App Links?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Deep links are the broader mechanism. Verified Android App Links use website association to establish a trusted relationship between a domain and an application.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What is assetlinks.json?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">It is a Digital Asset Links association file used to declare relationships between websites and Android applications.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Where should assetlinks.json be hosted?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">At:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>https:\/\/yourdomain.com\/.well-known\/assetlinks.json<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Do Android App Links require HTTPS?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Production Android App Links rely on website association over HTTPS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can Jetpack Compose handle deep links?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. Navigation Compose supports deep-link patterns associated with navigation destinations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can a notification open a specific Compose screen?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes. Notifications can use appropriately configured Intents or navigation deep links to open destinations.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Are deep links secure by default?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No. Incoming parameters must be validated, and access to private resources must be authorized.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can Android App Links work without the app installed?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The HTTPS URL can open in a browser when the application is not installed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">How do I test App Links?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Use ADB, domain verification inspection, physical devices, and real browser or messaging-app interactions.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Android deep links and App Links help create seamless navigation between websites, notifications, browsers, and mobile applications.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">By combining <strong>Kotlin, Jetpack Compose, Navigation Compose, AndroidManifest intent filters, and Digital Asset Links<\/strong>, developers can build reliable URL-based navigation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Verified Android App Links provide an additional layer of domain association and improve the experience of opening website content directly inside an application.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">However, secure implementation requires careful validation, authentication, authorization, and testing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The most important principle is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Treat every incoming deep link as untrusted input, even when the domain association is verified.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With a well-designed navigation architecture and proper verification configuration, Android applications can provide smooth, predictable, and secure navigation experiences.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Official References<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/developer.android.com\/training\/app-links\" target=\"_blank\" rel=\"noopener\">Android App Links<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.android.com\/training\/app-links\/verify-android-applinks\" target=\"_blank\" rel=\"noopener\">Verify Android App Links<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.android.com\/training\/app-links\/deep-linking\" target=\"_blank\" rel=\"noopener\">Create Deep Links to App Content<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.android.com\/develop\/ui\/compose\/navigation\" target=\"_blank\" rel=\"noopener\">Navigation Compose<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developers.google.com\/digital-asset-links\" target=\"_blank\" rel=\"noopener\">Digital Asset Links<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/developer.android.com\/privacy-and-security\/security\" target=\"_blank\" rel=\"noopener\">Android Security<\/a><\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p class=\"wp-block-paragraph\"><em>Published by Moiks Developer Blog \u2014 Practical Android development tutorials using Kotlin, Jetpack Compose, and modern Android architecture.<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Learn how to implement Android App Links and deep links using Kotlin and Jetpack Compose. Configure intent filters, verified HTTPS links, Digital Asset Links, assetlinks.json, and Navigation Compose. Build secure URL-based navigation with practical examples, ADB testing, and production best practices.<\/p>\n","protected":false},"author":1,"featured_media":259,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":2,"footnotes":""},"categories":[87,3,333,14],"tags":[89,88,93,91,90,94,28,26,92],"class_list":["post-258","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-navigation","category-android-development","category-android-tutorials","category-android-security","tag-android-app-links","tag-android-deep-links","tag-androidmanifest","tag-assetlinks-json","tag-digital-asset-links","tag-intent-filters","tag-jetpack-compose","tag-kotlin","tag-navigation-compose"],"_links":{"self":[{"href":"https:\/\/moiks.com\/blog\/wp-json\/wp\/v2\/posts\/258","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/moiks.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/moiks.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/moiks.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/moiks.com\/blog\/wp-json\/wp\/v2\/comments?post=258"}],"version-history":[{"count":1,"href":"https:\/\/moiks.com\/blog\/wp-json\/wp\/v2\/posts\/258\/revisions"}],"predecessor-version":[{"id":260,"href":"https:\/\/moiks.com\/blog\/wp-json\/wp\/v2\/posts\/258\/revisions\/260"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/moiks.com\/blog\/wp-json\/wp\/v2\/media\/259"}],"wp:attachment":[{"href":"https:\/\/moiks.com\/blog\/wp-json\/wp\/v2\/media?parent=258"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/moiks.com\/blog\/wp-json\/wp\/v2\/categories?post=258"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/moiks.com\/blog\/wp-json\/wp\/v2\/tags?post=258"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}