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 = hackleClient.remoteConfig();
String strValue = remoteConfig.getString(“parameter_key_string_type”, “defaultValue”);
String jsonValue = remoteConfig.getString(“parameter_key_json_type”, “defaultValue”);
val remoteConfig: HackleRemoteConfig = hackleClient.remoteConfig()
val strValue: String = remoteConfig.getString(“parameter_key_string_type”, “defaultValue”)
val jsonValue: String = remoteConfig.getString(“parameter_key_json_type”, “defaultValue”)
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 = hackleClient.remoteConfig();
int intValue = remoteConfig.getInt(“parameter_key_int_type”, 0);
val remoteConfig: HackleRemoteConfig = hackleClient.remoteConfig()
val intValue: Int = remoteConfig.getInt(“parameter_key_int_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 = hackleClient.remoteConfig();
double doubleValue = remoteConfig.getDouble(“parameter_key_double_type”, 0.0);
val remoteConfig: HackleRemoteConfig = hackleClient.remoteConfig()
val doubleValue: Double = remoteConfig.getDouble(“parameter_key_double_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 = hackleClient.remoteConfig();
long longValue = remoteConfig.getLong(“parameter_key_long_type”, 0L);
val remoteConfig: HackleRemoteConfig = hackleClient.remoteConfig()
val longValue: Long = remoteConfig.getLong(“parameter_key_long_type”, 0L)
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 = hackleClient.remoteConfig();
boolean booleanValue = remoteConfig.getBoolean(“parameter_key_boolean_type”, false);
val remoteConfig: HackleRemoteConfig = hackleClient.remoteConfig()
val booleanValue: Boolean = remoteConfig.getBoolean(“parameter_key_boolean_type”, false)
Updated almost 2 years ago