private void Process_Event(AndroidJavaObject inObject) { GenieResponseWrapper wrapper = new GenieResponseWrapper(inObject); //wrapper.Log(); Process(wrapper); }
private void GetUserResult(bool inbSuccess, GenieResponseWrapper inResponse) { if (inbSuccess) { SetUserProfile(inResponse); } else { m_UserProfileProxy.setAnonymousUser(m_SetAnonUserHandler); } }
public override void Process(GenieResponseWrapper inWrapper) { if (inWrapper.getStatus() != "successful") { Debug.LogFormat("Sending this event was unsuccessful: {0}", inWrapper.getError()); } else { Logger.Log("Send was successful!"); } }
public override void Process(GenieResponseWrapper inWrapper) { Genie.I.IsSyncing = false; if (inWrapper.getStatus() != "successful") { Debug.LogWarningFormat("Unable to sync with Genie: {0}", inWrapper.getError()); } else { Logger.Log("Sync was successful!"); } }
public override void Process(GenieResponseWrapper inWrapper) { if (inWrapper.getStatus() != "successful") { Genie.instance.MakeAnonymousResult(false); } else { Genie.instance.MakeAnonymousResult(true); Logger.Log("Successfully created an anonymous user!"); } }
private void onFailure_Event(AndroidJavaObject inResponse) { GenieResponseWrapper response = new GenieResponseWrapper(inResponse); if (response.getError() == kError_GenieNotInstalled) { Genie.instance.OnGenieNotInstalled(); } else { Assert.Fail("Error on DataExport: {0}", response.getError()); } }
public override void Process(GenieResponseWrapper inWrapper) { if (inWrapper.getStatus() == "successful") { Logger.Log("Successfully found the current user: {0}!", inWrapper.getStringResult("uid")); Genie.instance.GetUserResult(true, inWrapper); } else { Logger.Log("Unable to find current user."); Genie.instance.GetUserResult(false, inWrapper); } }
public override void Process(GenieResponseWrapper inWrapper) { if (inWrapper.getStatus() == "successful") { string uid = inWrapper.getStringResult("uid"); if (uid != Genie.I.UserID) { Logger.Log("User changed partway through - restarting the application."); Genie.I.LogEnd(); Genie.instance.GetUserResult(true, inWrapper); AndroidHelper.RestartActivity(); } } else { AndroidToast.Show("Please sign back into Genie."); AndroidHelper.KillActivity(); } }
private void SetUserProfile(GenieResponseWrapper inResponse) { UserID = inResponse.getStringResult("uid"); SaveData.instance.SetUserID(UserID); m_UserProfileLoaded = true; string handle = inResponse.getStringResult("handle", string.Empty); IsAnonymousUser = UserID == EMPTY_UID || String.IsNullOrEmpty(handle); if (!IsAnonymousUser) { UserData = new JSONClass(); UserData["gender"] = inResponse.getStringResult("gender", string.Empty); UserData["age"] = inResponse.getIntResult("age").ToStringLookup(); UserData["standard"] = inResponse.getIntResult("standard").ToStringLookup(); UserLanguage = inResponse.getStringResult("language", string.Empty); Logger.Log("Handle: \"{0}\"\nLanguage: \"{1}\"\nData: {2}", handle, UserLanguage, UserData.ToFormattedString()); } LogStart(); }
public abstract void Process(GenieResponseWrapper inWrapper);