Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Question] Get DeeplinkResult without launching activity #304

Open
hashlin opened this issue Jan 11, 2021 · 2 comments
Open

[Question] Get DeeplinkResult without launching activity #304

hashlin opened this issue Jan 11, 2021 · 2 comments

Comments

@hashlin
Copy link

hashlin commented Jan 11, 2021

I come up with a question as I'm not sure if my usecase is supported or not.

Usecase

  • If deeplink comes from within the app (i.e. deeplink navigation within same app ), launch desired activity without touching current backstack.
  • If deeplink comes from external (i.e. from social apps, notifications etc), launch desired activity with creating proper backstack.

What I looked for

I was searching for a method that return DeeplinkResult but not launching activities inside the method, so that the returned DeeplinkResult can be used for general purposes.

Example

val deeplinkResult = delegate.dispatchFrom(activity, intent) // This method returns result, but it is also launching activities internally
if (comeFromExternal) {
 startActivityWithProperTaskStack(deeplinkResult.intent)
} else {
 startActivity(deeplinkResult.intent)
}

Is there any workaround for such usecase please?

@hashlin hashlin changed the title [Question] Conditional choice between Intent and TaskStackBuilder [Question] Get DeeplinkResult without launching activity Jan 11, 2021
@hashlin
Copy link
Author

hashlin commented Aug 27, 2021

#316 from version 5.4.0 and #318 from version 5.4.1 seems solves the question.

Thanks a lot. The library is amazing 🙇🏼

@mikebgrep
Copy link

@hashlin You can help me to set up in Java project I try but is not open the deep link from the annotation in the Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants