Example #1
0
        public void OnReceivingResponse(JSONArray data, IO.Branch.Referral.BranchError error)
        {
            if (callback == null)
            {
                return;
            }

            if (error == null)
            {
                callback.CreditHistory(BranchAndroidUtils.ToCreditHistoryArray(data));
            }
            else
            {
                BranchError err = new BranchError(error.Message, (int)error.ErrorCode);
                callback.RewardsRequestError(err);
            }
        }
        public void OnInitFinished(JSONObject data, IO.Branch.Referral.BranchError error)
        {
            if (callback == null)
            {
                return;
            }

            if (error == null)
            {
                callback.InitSessionComplete(BranchAndroidUtils.ToDictionary(data));
            }
            else
            {
                BranchError err = new BranchError(error.Message, error.ErrorCode);
                callback.SessionRequestError(err);
            }
        }
        public void OnInitFinished(IO.Branch.Indexing.BranchUniversalObject buo,
                                   IO.Branch.Referral.Util.LinkProperties blp,
                                   IO.Branch.Referral.BranchError error)
        {
            if (callback == null)
            {
                return;
            }

            if (error == null)
            {
                callback.InitSessionComplete(new BranchUniversalObject(BranchAndroidUtils.ToDictionary(buo)),
                                             new BranchLinkProperties(BranchAndroidUtils.ToDictionary(blp)));
            }
            else
            {
                BranchError err = new BranchError(error.Message, error.ErrorCode);
                callback.SessionRequestError(err);
            }
        }