airbnb / DeepLinkDispatch

A simple, annotation-based library for making deep link handling better on Android
http://nerds.airbnb.com/deeplinkdispatch/
4.39k stars 406 forks source link

Option to choose between Intent or TaskStackBuilder #179

Closed Diego-Franco closed 7 years ago

Diego-Franco commented 7 years ago

Hi, i have a question about the static methods for call/create the activities when deep link is called.

Let me explain a little bit, i have 3 cases

_1. The user has the Application open

  1. The user had the Application open but clicked on Home button ( send application to background)
  2. The user doesn't have the application open_

for that 3 cases, i have different behaviors, (e.g we'll have one class call Previous Activity)

1.1 The user click in a deep link inside on the app. so the Previous Activity has to be there if the user click on back button

2.1 The user been on the Previous Activity and now the app is on background. The user clicked on a deep link and the flow has to be something like this: -> Pin Code Screen -> Deep Link Screen -> Previous Activity if the user clicked on the back button

3.1 The user doesn't have the Application open and clicked on a deep link, so the flow hast to be like this: -> Pin Code Screen -> Deep Link Screen -> Main/Home Screen if the user clicked on the back button

for the point 3.1 if i use the TaskStackBuilder is working very well, but the another points (1.1 and 2.1) doesn't works

between that, if i use Intent the points 1.1 and 2.1 are working well, but the point 3.1 will not work.

so, is any option to have some kind of chose between TaskStackBuilder and Intent when i called the deep link static methods?

felipecsl commented 7 years ago

Not sure I understand your question, but whatever return type you set in your deep link method will be the one used by DeepLinkDispatch. If you want to decided that at runtime, that's not possible, because your method return type needs to be known at compile time. Anyways, I'd recommend posting questions to StackOverflow and keeping this Issues Tracker for bugs and new features 😃 only. Good luck and thank you!