{"id":22796158,"url":"https://github.com/tatsuyafujisaki/android-deep-link-arbitrary-query-sample","last_synced_at":"2026-05-01T09:32:23.332Z","repository":{"id":78635738,"uuid":"269994639","full_name":"tatsuyafujisaki/android-deep-link-arbitrary-query-sample","owner":"tatsuyafujisaki","description":"Sample of passing arbitrary query parameters using with a deep link to an Android app","archived":false,"fork":false,"pushed_at":"2021-01-07T12:38:00.000Z","size":175,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T00:43:16.072Z","etag":null,"topics":["android","deep-link","query-string"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tatsuyafujisaki.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-06T13:47:59.000Z","updated_at":"2024-12-29T22:29:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"04dc08b4-843f-4b26-a4c6-1e204c6f5031","html_url":"https://github.com/tatsuyafujisaki/android-deep-link-arbitrary-query-sample","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tatsuyafujisaki/android-deep-link-arbitrary-query-sample","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatsuyafujisaki%2Fandroid-deep-link-arbitrary-query-sample","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatsuyafujisaki%2Fandroid-deep-link-arbitrary-query-sample/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatsuyafujisaki%2Fandroid-deep-link-arbitrary-query-sample/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatsuyafujisaki%2Fandroid-deep-link-arbitrary-query-sample/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tatsuyafujisaki","download_url":"https://codeload.github.com/tatsuyafujisaki/android-deep-link-arbitrary-query-sample/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tatsuyafujisaki%2Fandroid-deep-link-arbitrary-query-sample/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32492177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","deep-link","query-string"],"created_at":"2024-12-12T05:10:51.577Z","updated_at":"2026-05-01T09:32:23.311Z","avatar_url":"https://github.com/tatsuyafujisaki.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# How to test deep links\n## Option 1\nAs per [the documentation](https://developer.android.com/training/app-links/deep-linking#testing-filters), run the following from Terminal.\n```shell\nadb shell am start -a android.intent.action.VIEW -d \"https://example.com/?key1=value1\u0026key2=value2\"\n```\nNote that you have to escape `\u0026` to `%26` to pass more than one query parameter.\n### Result\n\u003cimg src=\"screenshots/result1.png\" width=\"320\" /\u003e\n\n## Option 2\n1. Open Android Studio.\n2. Go to Menu bar \u003e `Run` \u003e `Edit Configurations` \u003e `General` tab \u003e `Launch` \u003e `URL`.\n3. Put the following in `URL`.\n```\nhttps://example.com/?key1=value1\u0026key2=value2\n```\n4. Run the app.\n### Result\n\u003cimg src=\"screenshots/result2.png\" width=\"320\" /\u003e\n\n# How to take an arbitrary query string in fragments\n```\nThe following steps are already done in this sample app.\n```\n1. Create a navigation graph XML like `res/navigation/nav_graph.xml`.\n```xml\n\u003cnavigation xmlns:app=\"http://schemas.android.com/apk/res-auto\"\n    android:id=\"@+id/nav_graph\"\n    app:startDestination=\"@id/FirstFragment\"\u003e\n    \u003cfragment\n        android:id=\"@+id/FirstFragment\"\n        android:name=\"com.github.tatsuyafujisaki.deeplinkarbitraryquerysample.FirstFragment\" \u003e\n        \u003c!-- The domain must ends with a trailing slash (i.e. example.com -\u003e example.com/) to get a query string by KEY_DEEP_LINK_INTENT. --\u003e\n        \u003cdeepLink app:uri=\"example.com/\" /\u003e\n    \u003c/fragment\u003e\n\u003c/navigation\u003e\n```\n2. Reference the navigation graph XML in `AndroidManifest.xml`.\n```xml\n\u003cmanifest xmlns:android=\"http://schemas.android.com/apk/res/android\" ...\u003e\n    \u003capplication ...\u003e\n        \u003cactivity ...\u003e\n            \u003cnav-graph android:value=\"@navigation/nav_graph\" /\u003e\n        \u003c/activity\u003e\n    \u003c/application\u003e\n\u003c/manifest\u003e\n```\n3. Add the following in Fragment's `onCreateView()`.\n```kotlin\nclass FirstFragment : Fragment() {\n    override fun onCreateView(...): View? {\n        // ...\n        \n        val queryString = arguments\n            ?.getParcelable\u003cIntent\u003e(NavController.KEY_DEEP_LINK_INTENT)\n            ?.data\n            ?.encodedQuery\n\n        // ...\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftatsuyafujisaki%2Fandroid-deep-link-arbitrary-query-sample","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftatsuyafujisaki%2Fandroid-deep-link-arbitrary-query-sample","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftatsuyafujisaki%2Fandroid-deep-link-arbitrary-query-sample/lists"}