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 Hive SDK settings while the app is running, here are the cases.
Hive SDK initialization before¶
Before initializing the Hive SDK, reflect the game server or game language in the settings.
Hive SDK initialization ~ before server maintenance popup¶
This is the case where the user selects a game server before displaying the server maintenance popup after initializing the Hive SDK. After initializing the Hive 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.
Hive 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 Hive 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 Hive SDK, the Hive 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 | Hive SDK Features | Description | SDK Default |
---|---|---|---|---|
hiveSDKVersion | Android, iOS, Windows | Hive SDK Common | This is the version of the Hive SDK. | The applied HiveSDK version value |
referenceSDKVersion | Android, iOS, Windows | Hive SDK Common | This is the SDK version referenced by the Hive SDK. | Information about the library and version referenced by the applied HiveSDK |
hiveCountry | Android, iOS, Windows | Hive SDK Common | This is the country code determined by the Hive SDK server. | Information provided by the HiveSDK server |
appId | Android, iOS, Windows | Hive SDK Common | This is the game build identifier. | X |
serverId | Android, iOS, Windows | Hive 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 | Hive SDK Common | This is the server that the Hive client will connect to.
| REAL |
useLog | Android, iOS, Windows | Hive 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 | Hive 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 Hive SDK, it corresponds to C2S. It is used for collecting Hive SDK analytics data.
| C2S |
market | Android, iOS, Windows | Hive SDK Common | This is the market for processing in-app purchases. It is used for collecting Hive SDK analytics data.
| Blank |
httpConnectTimeout | Android, iOS, Windows | Hive 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 | Hive 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 | Hive SDK Common | This is the game language set in the Hive SDK. | Device language setting |
ageGateU13 | Android, iOS, Windows | Provisioning | This indicates whether to apply COPPA ageGateU13. To apply COPPA ageGateU13 in the Hive SDK, you must register the COPPA terms in the Hive console and set this value to true before initializing the Hive SDK. If you do not wish to apply COPPA ageGateU13, set this value to false before initializing the Hive SDK while registering terms other than COPPA in the Hive 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 | Hive SDK Common | This feature sets whether to enable the 'game controller' in the UI provided by the Hive 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 HiveSDK 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 | Hive SDK Common | You can set the Hive theme to use either a light or dark theme. | HiveTheme.HiveLight |
Changeable settings with 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 Hive 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 | Hive SDK Features | Description | Required | SDK Default Value |
---|---|---|---|---|---|
appId | Android, iOS, Windows | Hive SDK Common | Game build identifier. | X | * Android: App base package name * iOS: Bundle ID |
serverId | Android, iOS, Windows | Hive 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 | Hive SDK Common | The server that the Hive client will connect to.
| X | REAL |
useLog | Android, iOS, Windows | Hive 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 | Hive 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 Hive SDK, this corresponds to C2S. Used for Hive SDK analytics data collection.
| O | C2S |
market | Android, iOS, Windows | Hive SDK Common | The market for processing in-app purchase payments. Used for Hive SDK analytics collection.
| O | Blank |
httpConnectTimeout | Android, iOS, Windows | Hive 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 | Hive 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 | Hive SDK Common | The game language set in the Hive SDK. | X | Device language setting |
ageGateU13 | Android, iOS, Windows | Provisioning | Whether to apply COPPA ageGateU13. To apply COPPA ageGateU13 in the Hive SDK, this value must be set to true after registering the COPPA terms in the Hive console and before initializing the Hive SDK. To not apply COPPA ageGateU13, this value must be set to false after registering terms other than COPPA in the Hive console and before initializing the Hive 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 | Hive SDK Common | A feature that sets whether to enable the 'game controller' in the UI provided by the Hive 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 HiveSDK 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 | Hive SDK Common | You can set the Hive theme to use either a light or dark theme. | 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 Hive 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 | Hive SDK Features | Description | Required | SDK Default Value |
---|---|---|---|---|---|
permissions | Android | Hive 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 | Hive SDK Common | (deprecated from v4.162) Whether to display the Hive SDK permission notice popup.
| X | true |
company | Android, iOS, Windows | Hive SDK Common | (deprecated from v4.23.0) The name of the game publishing company. | X | None |