Remote Config Appliance
Remote Config
Remote config controls the behavior and settings of an application in real-time by replacing the values or properties controlled in application with the parameters defined in the hackle dashboard. The parameter can be set to a target value for all properties of the client/server side app (ex. button color, external link).
First, set parameter information and values according to user identifier rules in Hackle's dashboard. In order to apply the remote config, you need to use the following functions provided by the Hackle SDK.
After applying the values ββto be applied to the code provided by the Hacker SDK, you can simply change the values ββand rules on the remote config to apply the changes immediately without republishing.
Remote Configs are only available for SDK version 2.11.0 or higher.
When using remote configs, please apply SDK version 2.11.0 or higher when adding dependencies.
remoteConfig
Call remoteConfig()
method to obtain HackleRemoteConfig
instance which contains the remote config information (about parameter settings and rules)
You can access the desired parameters through the HackleRemoteConfig
instance and receive values.
// Returns an instance containing remote config information.
HackleRemoteConfig remoteConfig = hackleClient.remoteConfig();
// Returns an instance containing remote config information.
val remoteConfig: HackleRemoteConfig = hackleClient.remoteConfig()
Remote config parameter inquiry
HackleRemoteConfig
instance passed through theremoteConfig()
method has full parameter setting information set by Remote Config.- Parameter values you've set on the dashboard exists in the form of key and value, therefore you can use the method below to set the parameter values.
- You can change rules and values flexibly on the Remote Config > Parameter Settings.
Remove code related to the Remote Config after archiving the parameter key
If the code related to Remote Config is left unattended after your parameter key has been archived and you've long forgotten about it, service stability problems such as latency issues may occur.
- There may be high dependency when writing code related to the different versions of the Remote Config.
- Unnecessary server traffic may occur.
Therefore, make sure to clean up the related code after archiving the parameter key.
getString
- Returns the parameter value set to STRING, JSON type.
- Returns the default value or the value set in the rule based on the status determination.
HackleRemoteConfig remoteConfig = hackle.RemoteConfig();
string strValue = remoteConfig.GetString("parameter_key_string_type", "defaultValue");
string jsonValue = remoteConfig.GetString("parameter_key_json_type", "{}");
GetInt
- Returns the parameter value set to Number type as Int type.
- Returns the default value or the value set in the rule based on the status determination.
HackleRemoteConfig remoteConfig = hackle.RemoteConfig();
int intValue = remoteConfig.GetInt("parameter_key_number_type", 0);
GetDouble
- Returns the parameter value set to Number type as Double type.
- Returns the default value or the value set in the rule based on the status determination.
HackleRemoteConfig remoteConfig = hackle.RemoteConfig();
double doubleValue = remoteConfig.GetDouble("parameter_key_number_type", 0.0);
GetLong
- Returns the parameter value set to Number type as Long type.
- Returns the default value or the value set in the rule based on the status determination.
HackleRemoteConfig remoteConfig = hackle.RemoteConfig();
long longValue = remoteConfig.GetLong("parameter_key_number_type", 0);
GetBoolean
- Returns the parameter value set to Boolean type.
- Returns the default value or the value set in the rule based on the status determination.
HackleRemoteConfig remoteConfig = hackle.RemoteConfig();
bool boolValue = remoteConfig.GetBoolean("parameter_key_boolean_type", false);
Updated about 2 years ago