For the complete documentation index, see llms.txt. This page is also available as Markdown.

Remote Config

Remote Config is a feature that allows you to replace values or properties managed within your application with parameter values defined in the Hackle Dashboard, enabling you to control your application's behavior and settings in real time.

Navigate to the Remote Config screen in the Hackle Dashboard to configure parameters and set values based on user identification rules.

remoteConfig

Calling the remoteConfig() method returns a HackleRemoteConfig instance that contains the Remote Config information for the user (configured parameters and rule information). remoteConfig() accepts user identifier information to match user properties against the Remote Config rule information. You can access the desired parameters and receive their values through the methods provided by HackleRemoteConfig.

import io.hackle.sdk.HackleClient
import io.hackle.sdk.common.User
import io.hackle.sdk.common.HackleRemoteConfig

// User object — refer to the User Identifier & Properties guide
val user: User = Hackle.user("ae2182e0")

// Returns an instance containing Remote Config information.
val remoteConfig: HackleRemoteConfig = hackleClient.remoteConfig(user)

Query Remote Config Parameters

  • Since parameter values configured in the Hackle Remote Config screen are stored as key-value pairs, use the methods below according to the parameter type to retrieve the configured values.

getString

  • Returns parameter values configured as STRING or JSON type.

  • Returns the default value or the value configured in a rule based on the state decision.

getInt

  • Returns parameter values configured as Number type as an Int.

  • Returns the default value or the value configured in a rule based on the state decision.

getDouble

  • Returns parameter values configured as Number type as a Double.

  • Returns the default value or the value configured in a rule based on the state decision.

getLong

  • Returns parameter values configured as Number type as a Long.

  • Returns the default value or the value configured in a rule based on the state decision.

getBoolean

  • Returns parameter values configured as Boolean type.

  • Returns the default value or the value configured in a rule based on the state decision.

Last updated