Similar question: Android 12 - Notification trampoline restrictions
My question is slightly different from the above question because I am asking for a fundamental proper way to handle the deeplinks.
I am displaying the notification triggered by the Push notification. If the app is Multi-Activity architecture and the app needs to open different Activity depends on the deeplink value, then there are 2 ways to handle:
- Interpret the deeplink value first and then register the proper Activity when clicked.
- Use a transparent dummy Activity as the destination. Have the TransparentDeeplinkHandleActivity::class.java to handle which Activity to open.
I am an SDK developer which makes it slightly more complicated. I don't know the client's destination Activity class and if they are using Multi-Activity or Single-Activiy-multi-Fragment architecture.
Solution 2 sounds a bit hacky. Should I implement the callback to ask the client-side to return the destination Activity class given the deeplink path?