I am new in branch.io and i am following their official documentation. when i run my application onInitFinished
method is not called. i had found the same question here but a term postBranchInitSession(null);
used in the solution which is unknown to me and i tried to find out but did not get anything. on its official documentation there is very confusing documentation, from that documentation i am not getting something
here is my code:
try {
branch = Branch.getInstance();
branch.initSession(new Branch.BranchReferralInitListener() {
@Override
public void onInitFinished(JSONObject referringParams, BranchError error) {
if (error == null) {
Log.d("Splash onStart", referringParams.toString());
} else {
Log.i("MyApp", error.getMessage());
}
}
}, this.getIntent().getData(), this);
} catch (Exception ex) {
}
Please help me!
After checking so many Questions and solutions on StackOverFlow
and other sites i have solved this problem by adding android:name="io.branch.referral.BranchApp"
in application as shown below:
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme"
android:name="io.branch.referral.BranchApp">
...
</application>
as suggested here by Alex Bauer
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With