Пример #1
0
    //fetch(long intervalSeconds) Fetches latest parameter values from Remote Configuration at
    //a customized interval. If the method is called within an interval, cached data is returned.
    public void Fetch(long intervalSeconds)
    {
        ITask <ConfigValues> x = agc.Fetch(intervalSeconds);

        x.AddOnSuccessListener((configValues) =>
        {
            OnFecthSuccess?.Invoke(configValues);
        });
        x.AddOnFailureListener((exception) =>
        {
            OnFecthFailure?.Invoke(exception);
        });
    }
    //fetch() Fetches latest parameter values from Remote Configuration at the default
    //interval of 12 hours. If the method is called within an interval, cached data is returned.
    public void Fetch()
    {
        ITask <ConfigValues> x = agc.Fetch();

        x.AddOnSuccessListener((configValues) =>
        {
            Debug.Log("[HMSRemoteConfigManager] Fetch success.");
            OnFecthSuccess?.Invoke(configValues);
        });
        x.AddOnFailureListener((exception) =>
        {
            Debug.LogError("[HMSRemoteConfigManager]: Fetch failed. CauseMessage: " + exception.WrappedCauseMessage + ", ExceptionMessage: " + exception.WrappedExceptionMessage);
            OnFecthFailure?.Invoke(exception);
        });
    }