branch.io邀请和兑换

时间:2017-08-14 08:03:27

标签: android branch.io referrals firebase-invites

一切正常,但兑换点击。信用不会减少!

我在片段中使用此方法!

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);
                    }
                });
            }

1 个答案:

答案 0 :(得分:0)

阿比纳夫

这是来自branch.io的Vatsal

  • 请确保用户有足够的积分兑换。

此外,尝试使用此侦听器方法来获取您正在接收的错误并共享日志:

  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 ");
              }
            }
          }
        });