Remote Config SDK API reference

Classes

RemoteConfigService

public sealed class RemoteConfigService

Use this class to fetch and apply your configuration settings at runtime. RemoteConfigService is wrapper class to mimic the functionality of underlying ConfigManagerImpl class. It uses an instance of ConfigManagerImpl class, making it a primitive class of ConfigManagerImpl.

FetchCompleted

public event Action<ConfigResponse> FetchCompleted

This event fires the the configuration manager successfully fetches settings from the service. It returns a struct representing the response of a Remote Config fetch.

appConfig

public RuntimeConfig appConfig

Retrieves the RuntimeConfig object for handling Remote Config settings. Use this property to access the following methods and classes:

MethodDescription
public string assignmentIDA unique string identifier used for reporting and analytic purposes. The Remote Config service generates this ID upon configuration requests.
public bool GetBool (string key, bool defaultValue)Retrieves the boolean value of a corresponding key from the remote service, if one exists.
public float GetFloat (string key, float defaultValue)Retrieves the float value of a corresponding key from the remote service, if one exists.
public long GetLong (string key, long defaultValue)Retrieves the long value of a corresponding key from the remote service, if one exists.
public int GetInt (string key, int defaultValue)Retrieves the integer value of a corresponding key from the remote service, if one exists.
public string GetString (string key, string defaultValue)Retrieves the string value of a corresponding key from the remote service, if one exists.
public bool HasKey (string key)Checks if a corresponding key exists in your remote settings.
public string[] GetKeys ()Returns all keys in your remote settings, as an array.
public string[] GetJson ()Returns string representation of the JSON value of a corresponding key from the remote service, if one exists.

GetConfig

public RuntimeConfig GetConfig(string configType)

Retrieves the particular config from multiple config objects by passing the configType.

SetCustomUserID

public void SetCustomUserID(string customUserID)

Sets a custom user identifier for the Remote Config delivery request payload.

SetEnvironmentID

public void SetEnvironmentID(string environmentID)

Sets an environment identifier for the Remote Config delivery request payload.

SetPlayerIdentityTokenID

public void SetPlayerIdentityTokenID(string playerIdentityTokenID)

Sets a player identity token.

SetUserID

public void SetUserID(string iid)

Sets the userId to InstallationID identifier coming from Core services.

SetPlayerID

public void SetPlayerID(string playerID)

Sets the player identifier coming from Authentication services.

SetAnalyticsUserID

public void SetAnalyticsUserID(string analyticsUserID)

Sets the analytics user identifier coming from Core services.

SetConfigAssignmentHash

public void SetConfigAssignmentHash(string confiAssignmentHashID)

Sets the configAssignmentHash identifier coming from Core services.

FetchConfigsAsync

public Task<RuntimeConfig> FetchConfigsAsync<T, T2, T3>(string configType, T userAttributes, T2 appAttributes, T3 filterAttributes)

Fetches an app configuration settings from the remote server.

ParameterDescription
configTypeA string containing a cofigType. If none apply, use an empty string.
userAttributesA struct containing custom user attributes. If none apply, use an empty struct.
appAttributesA struct containing custom app attributes. If none apply, use an empty struct.
filterAttributesA struct containing custom filter attributes. If none apply, use an empty struct.
TThe type of the userAttributes struct.
T2The type of the appAttributes struct.
T3The type of the filterAttributes struct.

Enums

ConfigOrigin

An enum describing the origin point of your most recently loaded configuration settings.

ValueDescription
DefaultIndicates that no configuration settings loaded in the current session.
CachedIndicates that the configuration settings loaded in the current session are cached from a previous session (in other words, no new configuration settings loaded).
RemoteIndicates that new configuration settings loaded from the remote server in the current session.

ConfigRequestStatus

An enum representing the status of the current Remote Config request.

ValueDescription
NoneIndicates that no Remote Config request has been made.
FailedIndicates that the Remote Config request failed.
SuccessIndicates that the Remote Config request succeeded.
PendingIndicates that the Remote Config request is still processing.