Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/emilymclean/linkresolver
https://github.com/emilymclean/linkresolver
Last synced: 16 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/emilymclean/linkresolver
- Owner: emilymclean
- License: apache-2.0
- Created: 2021-06-10T05:41:42.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-29T11:45:03.000Z (2 months ago)
- Last Synced: 2024-10-29T13:28:35.777Z (2 months ago)
- Language: Kotlin
- Size: 144 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Link Resolver for Android
[![Latest Release](https://jitpack.io/v/BenMMcLean/LinkResolver.svg)](https://jitpack.io/#BenMMcLean/LinkResolver/)
A simple library for handling links in Android.
## Installation
Add JitPack to your project level `build.gradle` file
```groovy
allprojects {
repositories {
maven { url 'https://jitpack.io' }
}
}
```
Then, include the modules as required
```groovy
dependencies {
implementation 'com.github.emilymclean.LinkResolver:0.5.0'
}
```## Usage
A link resolver can be instantiated using the static ```create()``` methods:
```kotlin
val resolver = LinkResolver.create(object : GlobalContextStrategy {
override fun fetchGlobalContext(): Context {
return YourApplicationSubclass.staticApplicationContextInstance
}
})
```
If a DI framework like Dagger is being used, this code (along with attached interceptors) should be packaged in a module.Additional link interceptors can then be attached; for example, if NavControllers are being used, the following code will automatically handle package deeplinks
```kotlin
resolver.register(PackageDeeplinkHandler(navController))
```