I set up Branch.io successfully and managed to receive the deep linking data when I subscribe on component did mount. For the sake of debugging with release bundle I have screen with Text component which shows the value of testData.
There are 2 scenarios, one working and one not working:
(Working) u don’t open the app → u navigate to some note (or gmail) → click the link → app is opened and the data from the link is being extracted on Branch.subscribe
(NOT working) u open the app → u minimize the app → u navigate to some note (or gmail) → click the link → app opens but the link data is not received and branch.subscribe is not triggered
Is there some configuration that I am missing? I tried subscribing on AppStateChange (foreground|background) + I tried using await Branch.getLatestReferringParams() (without any success in both scenarios)
Please help and thank you for reading, hope this helps other people as well.
As my research shows so far there is this hidden gem functionality (hidden because not mentioned into documentation) called “branch_force_new_session”: true … now I need to set this as an intent, but I have no idea how to do so in app.json
Branch fetches the first call when the app is opened. If the app is running in the background the links are being interrupted by different communication layer and Branch.io cannot be reached. Thats how I understood it, it doesn’t mean I am 100% right, this is based on lots of console.logs, builds and debugging.
Therefore you only need to call the branch link handling code. However on the backend, the Branch generated links need to contain the parameters in the URL in order for this to be feasible solution, because you won’t get the object bundle from branch when handling links with the Linking module.