Created
July 9, 2022 20:52
-
-
Save raystatic/5eebc539f50c6bc34ddd044137da11e2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Singleton | |
class Feature02DeeplinkProcessor @Inject constructor( | |
private val context: Context | |
) : DeeplinkProcessor { | |
override fun matches(deeplink: String): Boolean { | |
return deeplink.contains("/feat02") | |
} | |
override fun execute(deeplink: String) { | |
val extraData = deeplink.split("/feat02/").getOrNull(1) | |
val intent = Intent(context, Feature02Activity::class.java) | |
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) | |
intent.putExtra("extraData",extraData) | |
context.startActivity(intent) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment