It was working fine, the app was also in production. But recently we noticed that on android 12 when the user clicks on the notification it doesn't open the app and navigated the fragment/activity which the deep link has.
But as soon as the user opens the app the deep link gets fired(if the user has previously clicked on the notification then) and moves user to the destination which was in the deep link. And also if the user is in the app and clicks on the notification it will work fine. But if the user is outside the app it doesn't work in that case. We also tried to upgrade the firebaseBomVersion to the newest version (31.0.2). But nothing seems to work.
There are online other post related to deep link not working on android 12, but they all have are having different issues.
Does anybody know anything about this issue?
So, in the end, the problem was this
system_process E/NotificationService: Indirect notification activity start (trampoline) from com.xyz.debug blocked
On android 12 and above we can't start activities from a service or from a broadcast receiver on a notification tap (which is what I was here doing), I was trying to start an activity from the broadcast receiver, and I was firing that broadcast when the user was tapping on the notification.
When users interact with notifications, some apps respond to notification taps by launching an app component that eventually starts the activity that the user finally sees and interacts with. This app component is known as a notification trampoline.
To improve app performance and UX, apps that target Android 12 or higher can't start activities from services or broadcast receivers that are used as notification trampolines. In other words, after the user taps on a notification, or an action button within the notification, your app cannot call startActivity() inside of a service or broadcast receiver.
When your app tries to start an activity from a service or broadcast receiver that acts as a notification trampoline, the system prevents the activity from starting, and
How did I solve the problem simple, I used the same code, i.e. adding a broadcast to the pending intent and attaching that pending intent to the setContentIntent() on the notification for android 11 and lower devices but for android 12 and higher devices I replaced that broadcast to activity intent (an activity with transparent background) and in that activity, I placed the same broadcast code which I used for android 11 and lower devices and then using sendBroadcast() method I fired that intent myself and after that finished that activity.