Open Ghedeon opened 4 years ago
This seems to be working:
@JvmStatic
@DeepLink("www.foo.com/home")
fun messagesIntent(context: Context, extras: Bundle): Intent {
extras.putString(DeepLink.URI, "app://home")
return homeIntent(context)
}
Is that ok to override DeepLink.URI
like this?
Let say there are multiple external links that resolve to the same app link. Ex:
www.foo.com/home -> app://home
www.foo.com/dashboard -> app://home
Yes, we can list them all in
@DeepLink
annotation but in case we have some Uri pattern matching logic in the activity, we'd need to parse all of them. It would be much easier to just rethrow the app link, so it becomes a single source of truth, withoutwww.foo.com/home
even hitting the activity. Is there elegant way to declare such mapping? So far I can only think of custom handling inDeepLinkActivity
.