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

  • HackleRemoteConfiginstance passed through the remoteConfig() 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)