Branch: handling push notifications

Dear Community,

Is there anyone handling push notifications with branch links?

I’ve seen this solution GitHub - BranchMetrics/react-native-branch-deep-linking-attribution: The Branch React Native SDK for deep linking and attribution. Branch helps mobile apps grow with deep links / deeplinks that power paid acquisition and re-engagement campaigns, referral programs, content sharing, deep linked emails, smart banners, custom user onboarding, and more., but don’t have a clear picture of how to integrate RNBranch.initSession into MainActivity of the detached expo app.

If you’re familiar with it, could you please also recommend:

  1. whether we need to start a new activity (use newActivity flag when calling branch.openURL in JS);

  2. if not, how should we modify the Java part? I see BranchManager.handleLink called here and here. Should we just copy-paste the code from programmatic deep-linking session to our MainActivity.java and replace RNBranch.initSession by something else?

Best regards,
Nikita