Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React native android app not getting branch referral data after play store install

We have a react native app, compiled into both android and ios. We are using branch.io to track installs via different links and route the user to different places. The ios app works great in all scnearios.

For the android app, it works in every test case listed on the site (most of which are install the app but don't open it, then click the link, or vice versa), but when the link directs the user to the play store, and they download it from there, the link is not working.

I have seen 3 cases 1. It works fine (rare) 2. It doesn't work at all, and no data comes through 3. Params come through as +clicked_branch_link:false +is_first_session:true

I am using the latest version of react-native-branch from npm

So far, email support from branch has been unresponsive, and the one response I received was of no help

like image 280
Philberg Avatar asked Nov 07 '22 08:11

Philberg


1 Answers

For reference, I was using react-native-branch v2.2.4 from NPM

I tested the following cases:

  1. [Works] Click the branch link then install the app

  2. [Works] Install the app from an APK but don't open it, then click the link

  3. [Works] Install the app from the store THEN click the link
  4. [Broken] Click the link to install through the app store

Turns out, the issue was resolved by removing the following lines from the AndroidManifest.xml

        <!-- Branch install referrer tracking (optional) -->
    <receiver android:name="io.branch.referral.InstallListener" android:exported="true">
        <intent-filter>
            <action android:name="com.android.vending.INSTALL_REFERRER" />
        </intent-filter>
    </receiver>
like image 170
Philberg Avatar answered Nov 14 '22 22:11

Philberg