everything is working fine But on redeem click. The credit is not decreasing!
I'm using this method in a fragment!
redimbetn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
if(updateamt<100){
Branch.getInstance().loadRewards(new Branch.BranchReferralStateChangedListener() {
@Override
public void onStateChanged(boolean changed, BranchError error) {
Branch.getInstance().redeemRewards(1);
}
});
}
Abhinav
This is Vatsal from branch.io
Also, try using this listener method to get the error you are receiving and share the logs:
branch.redeemRewards(1, new BranchReferralStateChangedListener() {
@Override
public void onStateChanged(boolean changed, BranchError error) {
if (error != null) {
Log.i("RedeemTest", "branch redeem rewards failed. Caused by -" + error.getMessage());
} else {
if (changed) {
Log.i("RedeemTest", "redeemed rewards = " + true);
} else {
Log.i("RedeemTest", "redeem rewards unknown error ");
}
}
}
});