branch.io 邀请和兑换

branch.io invite and redeem

一切正常但点击兑换。功劳不减!

我正在片段中使用这个方法!

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

阿比纳夫

这是来自 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 ");
              }
            }
          }
        });