{"id":17651128,"url":"https://github.com/jeziellago/linkt","last_synced_at":"2025-04-19T12:37:20.445Z","repository":{"id":41452012,"uuid":"335140648","full_name":"jeziellago/Linkt","owner":"jeziellago","description":"A lightweight and simple Kotlin library for deep link handling on Android 🔗.","archived":false,"fork":false,"pushed_at":"2021-05-17T11:40:06.000Z","size":145,"stargazers_count":102,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T07:51:26.037Z","etag":null,"topics":["android","deeplink","deeplink-library","kotlin","uri","url"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jeziellago.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-02T02:07:43.000Z","updated_at":"2025-01-02T22:57:38.000Z","dependencies_parsed_at":"2022-08-25T06:50:37.982Z","dependency_job_id":null,"html_url":"https://github.com/jeziellago/Linkt","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeziellago%2FLinkt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeziellago%2FLinkt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeziellago%2FLinkt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jeziellago%2FLinkt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jeziellago","download_url":"https://codeload.github.com/jeziellago/Linkt/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249694691,"owners_count":21311565,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","deeplink","deeplink-library","kotlin","uri","url"],"created_at":"2024-10-23T11:40:24.272Z","updated_at":"2025-04-19T12:37:20.405Z","avatar_url":"https://github.com/jeziellago.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Linkt ![](https://github.com/jeziellago/Linkt/workflows/CI/badge.svg?branch=main)  [![](https://androidweekly.net/issues/issue-453/badge)](https://androidweekly.net/issues/issue-453)\nA lightweight and simple kotlin library for deep link handling on Android.\n## Setup\nConfigure root `build.gradle` (jitpack.io):\n```  \nallprojects {  \n    repositories {  \n        ...  \n        maven { url 'https://jitpack.io' }  \n    }  \n}  \n```  \nAdd `Linkt` to your project `build.gradle`:\n```\ndependencies {\n  implementation 'com.github.jeziellago:Linkt:TAG'\n}\n```\n\n1. Create your `DeepLinkModule` and register deep links:\n```kotlin\nclass MyDeepLinkModule : DeepLinkModule {\n\n    override fun load() {\n        deepLinkOf(\n            \"linkt://sample\",\n            \"linkt://sample/{userId}/{userName}\"\n        ) { context, bundle -\u003e\n            Intent(context, MainActivity::class.java)\n                .apply { putExtras(bundle) }\n        }\n    }\n}\n```\n\n\u003e In multi-module projects you should have one or more DeepLinkModule`s.\n\u003e\n\n2. Register your modules into `Application#onCreate`, with `DeepLinkLoader#setup`:\n```kotlin\nclass MyApplication : Application() {\n    override fun onCreate() {\n        super.onCreate()\n        DeepLinkLoader.setup(MyDeepLinkModule())\n    }\n}\n```\n3. Create the `DeepLinkActivity` (or use yours if already exists), and call `DeepLinkLoader#loadFrom`:\n```kotlin\nclass DeepLinkActivity : AppCompatActivity() {\n    override fun onCreate(savedInstanceState: Bundle?) {\n        super.onCreate(savedInstanceState)\n        // resolve deeplink\n        DeepLinkLoader.loadFrom(this)\n    }\n}\n```\nDon't forget to configure `AndroidManifest.xml` (required for Android deep links):\n```xml\n\u003cactivity\n    android:name=\"org.linkt.DeepLinkActivity\"\n    android:theme=\"@android:style/Theme.NoDisplay\"\u003e\n    \u003cintent-filter\u003e\n        \u003caction android:name=\"android.intent.action.VIEW\" /\u003e\n        \u003ccategory android:name=\"android.intent.category.DEFAULT\" /\u003e\n        \u003ccategory android:name=\"android.intent.category.BROWSABLE\" /\u003e\n        \u003cdata android:scheme=\"mycompany\" /\u003e\n    \u003c/intent-filter\u003e\n\u003c/activity\u003e\n```\n## How to get data from deeplink?\nIn your activity, you can get path parameters and query values as `String` from `intent.extras`:\n### Path parameters\n- Template `linkt://sample/{userId}/{userName}`\n- Received: `linkt://sample/9999/Jose`\n```kotlin\n// get path parameters\nval userId = intent.extras.getString(\"userId\")\nval userId = intent.extras.getString(\"userName\")\n```\n### Query parameters\n- Template: `linkt://sample`\n- Received `linkt://sample?subject=Linkt\u0026name=Sample`\n```kotlin\n// get query parameters\nval subject = intent.extras.getString(\"subject\")\nval name = intent.extras.getString(\"name\")\n```\n### Path + query parameters\n- Template `linkt://sample/{userId}/{userName}`\n- Received `linkt://sample/999/Jose?subject=Linkt\u0026name=Sample`\n```kotlin\n// get path parameters\nval userId = intent.extras.getString(\"userId\")\nval userId = intent.extras.getString(\"userName\")\n// get query parameters\nval subject = intent.extras.getString(\"subject\")\nval name = intent.extras.getString(\"name\")\n```\n## Licence\n```\nCopyright (c) 2021 Jeziel Lago\n\nPermission is hereby granted, free of charge, to any person obtaining\na copy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be\nincluded in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeziellago%2Flinkt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjeziellago%2Flinkt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjeziellago%2Flinkt/lists"}