Reputation: 51
I am integrated and configured branch.io SDK according to docs.branch.io and create a link from branch.io dashboard to track installs but I am only able to see click counter and app re-open counter but not showing installs counter. Manifest.xml
<meta-data android:name="io.branch.sdk.BranchKey" android:value="my_live_key" />
<meta-data android:name="io.branch.sdk.BranchKey.test" android:value="my_test_key" />
<!-- Branch testing (TestMode "true" to simulate fresh installs on dev environment) -->
<meta-data android:name="io.branch.sdk.TestMode" android:value="false" />
<!-- Branch install referrer tracking -->
<receiver android:name="io.branch.referral.InstallListener" android:exported="true">
<intent-filter>
<action android:name="com.android.vending.INSTALL_REFERRER" />
</intent-filter>
</receiver>
<activity
android:name=".activities.MainActivity"
android:launchMode="singleTask"
android:theme="@style/AppTheme.NoActionBar.Splash"
android:windowSoftInputMode="adjustResize|stateHidden">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- Branch URI scheme -->
<intent-filter>
<data android:scheme="goalwise" android:host="open" />
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
</intent-filter>
<intent-filter android:autoVerify="true">
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data android:scheme="https" android:host="xjgf5.app.link" />
<data android:scheme="https" android:host="xjgf5-alternate.app.link" />
</intent-filter>
Application class
@Override
public void onCreate() {
super.onCreate();
// Initialize the Branch object
Branch.getAutoInstance(this);
}
MainActivity.java
@Override
protected void onStart() {
super.onStart();
Branch.getInstance().initSession(new Branch.BranchReferralInitListener() {
@Override
public void onInitFinished(JSONObject referringParams, BranchError error) {
if (error == null) {
Log.i("BRANCH SDK", referringParams.toString());
// Retrieve deeplink keys from 'referringParams' and evaluate the values to determine where to route the user
// Check '+clicked_branch_link' before deciding whether to use your Branch routing logic
} else {
Log.i("BRANCH SDK", error.getMessage());
}
}
}, this.getIntent().getData(), this);
IntegrationValidator.validate(MainActivity.this);
}
Upvotes: 0
Views: 165
Reputation: 4037
Please change the following line in your manifest file from:
<meta-data android:name="io.branch.sdk.TestMode" android:value="false" />
TO
<meta-data android:name="io.branch.sdk.TestMode" android:value="true" />
This would simulate an install even if the install was not made from the Play store and Branch would report that on the dashboard. This is called as test mode. More information here.
Upvotes: 1