Configuration class¶
Using the Configuration class, you can retrieve (get) or change (set) configuration values during app runtime. For example, when retrieving app server information, use the getServerId() method, and when changing it, use the setServerId() method.
As an example of using the Configuration class, you can change the user's zone settings during app execution with the Configuration class.
API Reference: hive.Configuration.setZone
API Reference: hive::Configuration::setZone
API Reference: Configuration.setZone
API Reference: Configuration.setZone
API Reference: ConfigurationInterface.setZone
API Reference: HIVEConfiguration:setZone
Note
The setZone method of the Configuration class must be called before invoking the setup function to work correctly.
Usage scenarios of the configuration class¶
If you need to change the SDK settings while the app is running, here are the cases.
Before SDK initialization¶
Before initializing the SDK, reflect the game server or game language in the settings.
After SDK initialization and before the server maintenance popup¶
This is the case where the user selects a game server before displaying the server maintenance popup after initializing the SDK. After initializing the SDK, the game server selection UI is exposed, and the selected game server by the user is reflected in the settings. After executing this process, the server maintenance popup is displayed.
Example: Game Server Selection UI 
After entering the game¶
If a user changes the game language or game server in the game settings after entering the game, they can configure the UI for changing the game server or game language in the game settings or other menus while playing the game. If the user changes the server or language using that UI, this information must also be reflected in the settings.
Example: Game Language Selection UI 
Other situations¶
Changes the previously set values due to various situations such as changes in game information depending on game planning and other circumstances.
Info
You cannot change runtime settings with the Configuration class, and there are also items that can only be retrieved.
Example of using the Configuration class¶
Here is an additional guide on using the Configuration class.
Theme settings¶
You can expose the dark theme using Configuration.setHiveTheme.
API Reference: hive.Configuration.setHiveTheme
API Reference: hive::Configuration::setHiveTheme
API Reference: hiveTheme
API Reference: Configuration.setHiveTheme
API Reference: HIVEConfiguration:setHiveTheme
API Reference: HIVEConfiguration:setHiveTheme
Configuration class and hive_config.xml file¶
Changing the settings (runtime settings) with the methods in the Configuration class overrides the values set in hive_config.xml (build time settings). In other words, the values set by the Configuration class take higher priority. However, the values set by the Configuration class are prioritized within the SDK, and the existing values in the hive_config.xml file are not changed.
For example, even if you set zone to sandbox in the above zone configuration in hive_config.xml, after changing this value to real with the Configuration class and initializing the SDK, the SDK will operate based on real. However, the zone in hive_config.xml will still remain as sandbox.
Configuration class for retrievable settings¶
The configuration class method allows you to retrieve values (get) for the settings that are only available as listed below.
| Item | OS | SDK Features | Description | SDK Default |
|---|---|---|---|---|
| hiveSDKVersion | Android, iOS, Windows | SDK Common | This is the version of the SDK. | The applied SDK version value |
| referenceSDKVersion | Android, iOS, Windows | SDK Common | This is the SDK version referenced by the SDK. | Information about the library and version referenced by the applied SDK |
| hiveCountry | Android, iOS, Windows | SDK Common | This is the country code determined by the Hive server. | Information provided by the Hive server |
| appId | Android, iOS, Windows | SDK Common | This is the game build identifier. | X |
| serverId | Android, iOS, Windows | SDK Common | This is the identifier for each game server that can be confirmed when the game operates servers regionally. It must be written according to the Hive identifier policy. | Blank |
| zone | Android, iOS, Windows | SDK Common | This is the server that the Hive client will connect to.
| REAL |
| useLog | Android, iOS, Windows | SDK Common | This indicates whether to enable logging for the internal operations of the Hive client. When logging is enabled, logs are output to the development tool screen.
| false |
| channel | Android, iOS, Windows | SDK Common | This is the platform for login and in-app support services used in the game app. If logging in to external social networks or using in-app purchases through the SDK, it corresponds to C2S. It is used for collecting SDK Analytics data.
| C2S |
| market | Android, iOS, Windows | SDK Common | This is the market for processing in-app purchases. It is used for collecting SDK Analytics data.
| Blank |
| httpConnectTimeout | Android, iOS, Windows | SDK Common | This is the timeout duration (in seconds) for HTTP Connect used internally by the Hive client. The default value is set to 8 seconds, and changing the value is prohibited unless in special circumstances. | 8 (unit: seconds) |
| httpReadTimeout | Android, iOS, Windows | SDK Common | This is the timeout duration (in seconds) for HTTP Read used internally by the Hive client. The default value is set to 8 seconds, and changing the value is prohibited unless in special circumstances (e.g., network delays or interruptions that have been confirmed to prevent normal log collection). | 8 (unit: seconds) |
| gameLanguage | Android, iOS | SDK Common | This is the game language set in the SDK. | Device language setting |
| ageGateU13 | Android, iOS, Windows | Provisioning | This indicates whether to apply COPPA ageGateU13. To apply COPPA ageGateU13 in the SDK, you must register the COPPA terms in the Console and set this value to true before initializing the SDK. If you do not wish to apply COPPA ageGateU13, set this value to false before initializing the SDK while registering terms other than COPPA in the Console.
| false |
| agreementDetermineBase | Android, iOS | Provisioning | This determines the criteria for obtaining agreement to the terms. You can choose either device or account, with the default being device.
| device |
| enableGameController | Windows | SDK Common | This feature sets whether to enable the 'game controller' in the UI provided by the SDK.
get function. | true |
| usePrivateBrowsingForAuth | Windows | Authentication | This determines whether to use incognito mode during Google Login authentication.
| true |
| maxGameLogSize | Android, iOS, Windows | Analytics | The maximum number of game logs stored as unstructured data files. The default value is 50, and this value is collected by the SDK Analytics server. | 50 |
| analyticsSendLimit | Android, iOS, Windows | Analytics | The maximum amount of logs to be sent during each Analytics log transmission cycle. The default value is 5. | 5 |
| analyticsQueueLimit | Android, iOS, Windows | Analytics | The maximum amount of Analytics logs that can be queued. The default value is 50. | 50 |
| analyticsSendCycle | Android, iOS, Windows | Analytics | The cycle for sending Analytics logs. It can be set in seconds, and Analytics logs will be sent every cycle set. The default value is 1 second. | 1 |
| hiveTheme | Android, iOS, Windows | SDK Common | You can set the theme to use either a light or dark style. | HiveTheme.HiveLight |
Changeable settings with the Configuration class¶
The items that can be changed (set) with the Configuration class methods are as follows. Mandatory items must be entered, while optional items can be entered as needed. If optional items are not entered, they will operate with the default values of the SDK. Even if it is a mandatory item, if it has already been entered in hive_config.xml and does not need to be changed at runtime, there is no need to change it with the Configuration class.
Warning
The serverId is a value that must only be set at runtime. Therefore, this value must be set using the Configuration class.
| Item | OS | SDK Features | Description | Required | SDK Default Value |
|---|---|---|---|---|---|
| appId | Android, iOS, Windows | SDK Common | Game build identifier. | X | * Android: App base package name * iOS: Bundle ID |
| serverId | Android, iOS, Windows | SDK Common | Each game server identifier that can be verified when operating servers regionally in the game. Must be written according to the Hive identifier policy. | O | Blank |
| zone | Android, iOS, Windows | SDK Common | The server that the Hive client will connect to.
| X | REAL |
| useLog | Android, iOS, Windows | SDK Common | Whether to enable logs for the internal operations of the Hive client. When logs are enabled, they will be output to the development tool screen.
| X | false |
| channel | Android, iOS, Windows | SDK Common | The login and in-app support service platform used in the game app. When logging in to external social platforms or using in-app purchases through the SDK, this corresponds to C2S. Used for SDK Analytics data collection.
| O | C2S |
| market | Android, iOS, Windows | SDK Common | The market for processing in-app purchase payments. Used for SDK Analytics collection.
| O | Blank |
| httpConnectTimeout | Android, iOS, Windows | SDK Common | The timeout duration (in seconds) for HTTP Connect used internally by the Hive client. The default value is set to 8 seconds, and changing this value is prohibited unless in special circumstances. | X | 8 (unit: seconds) |
| httpReadTimeout | Android, iOS, Windows | SDK Common | The timeout duration (in seconds) for HTTP Read used internally by the Hive client. The default value is set to 8 seconds, and changing this value is prohibited unless in special circumstances (e.g., network delays or disconnections that have been confirmed to disrupt normal log collection). | X | 8 (unit: seconds) |
| gameLanguage | Android, iOS, Windows | SDK Common | The game language set in the SDK. | X | Device language setting |
| ageGateU13 | Android, iOS, Windows | Provisioning | Whether to apply COPPA ageGateU13. To apply COPPA ageGateU13 in the SDK, this value must be set to true after registering the COPPA terms in the Console and before initializing the SDK. To not apply COPPA ageGateU13, this value must be set to false after registering terms other than COPPA in the Console and before initializing the SDK.
| X | false |
| agreementDetermineBase | Android, iOS | Provisioning | Determines the criteria for obtaining agreement to terms. You can choose either device or account, with the default being device.
| X | device |
| enableGameController | Windows | SDK Common | A feature that sets whether to enable the 'game controller' in the UI provided by the SDK.
get function. | X | true |
| usePrivateBrowsingForAuth | Windows | Authentication | Determines whether to use incognito mode during Google Login authentication.
| X | true |
| maxGameLogSize | Android, iOS, Windows | Analytics | The maximum number of game logs stored as unstructured data files. The default value is 50, and this value is collected by the SDK Analytics server. | X | 50 |
| analyticsSendLimit | Android, iOS, Windows | Analytics | The maximum amount of logs to send per Analytics log transmission cycle. The default value is 5. | X | 5 |
| analyticsQueueLimit | Android, iOS, Windows | Analytics | The maximum amount of Analytics logs that can be queued. The default value is 50. | X | 50 |
| analyticsSendCycle | Android, iOS, Windows | Analytics | This is the cycle for sending Analytics logs. It can be set in seconds, and Analytics logs will be sent at the configured interval. The default value is 1 second. | X | 1 |
| hiveTheme | Android, iOS, Windows | SDK Common | You can set the theme to use either a light or dark style. | X | HiveTheme.HiveLight |
Note
When applying COPPA ageGateU13, only the device(device)-based terms consent popup can be displayed.
When applying COPPA ageGateU13, if any user responds that they are 13 years or older during the terms consent process, the SDK will not apply COPPA ageGateU13 to that user. However, the value set in hive_config.xml (true) itself does not change.
Unsupported items¶
The following are the methods of the Configuration class that are no longer supported.
| Item | OS | SDK Features | Description | Required | SDK Default Value |
|---|---|---|---|---|---|
| permissions | Android | SDK Common | (deprecated from v4.16.3) Whether to request permissions set by permission type. The permission name is specific to Android features. | X | None |
| hivePermissionViewOn | Android | SDK Common | (deprecated from v4.162) Whether to display the SDK permission notice popup.
| X | true |
| company | Android, iOS, Windows | SDK Common | (deprecated from v4.23.0) The name of the game publishing company. | X | None |