Skip to content

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

using hive;  

Configuration.setZone(ZoneType.REAL);

API Reference: hive::Configuration::setZone

#include <HIVE_SDK_Plugin/HIVE_CPP.h>    
using namespace std;    
using namespace hive;      

Configuration::setZone(ZoneType::REAL);

API Reference: Configuration.setZone

import com.hive.Configuration    

Configuration.zone = Configuration.ZoneType.REAL

API Reference: Configuration.setZone

import com.hive.Configuration;    

Configuration.INSTANCE.setZone(Configuration.ZoneType.REAL);

API Reference: ConfigurationInterface.setZone

import HIVEService    

ConfigurationInterface.setZone(.real)

API Reference: HIVEConfiguration:setZone

#import <HIVEService/HIVEService-Swift.h>    

[HIVEConfiguration setZone: HIVEZoneTypeReal];
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

using hive;

Configuration.setHiveTheme(HiveThemeType.hiveLight);
Configuration.setHiveTheme(HiveThemeType.hiveDark);

API Reference: hive::Configuration::setHiveTheme

#include <HIVE_SDK_Plugin/HIVE_CPP.h>
using namespace std;
using namespace hive;

Configuration::setHiveTheme(HiveThemeType::hiveLight);
Configuration::setHiveTheme(HiveThemeType::hiveDark);

API Reference: hiveTheme

import com.hive.Configuration

Configuration.hiveTheme = HiveTheme.hiveLight
Configuration.hiveTheme = HiveTheme.hiveDark

API Reference: Configuration.setHiveTheme

import com.hive.Configuration;

Configuration.INSTANCE.setHiveTheme(Configuration.HiveTheme.HiveLight);
Configuration.INSTANCE.setHiveTheme(Configuration.HiveTheme.HiveDark);

API Reference: HIVEConfiguration:setHiveTheme

#import <HIVEService/HIVEService-Swift.h>

[HIVEConfiguration setHiveTheme: HIVEThemeTypeHiveLight];
[HIVEConfiguration setHiveTheme: HIVEThemeTypeHiveDark];

API Reference: HIVEConfiguration:setHiveTheme

import HIVEService

ConfigurationInterface.setHiveTheme(.hiveLight)
ConfigurationInterface.setHiveTheme(.hiveDark)

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: Operating server
  • sandbox: Test server
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.
  • true: Log enabled
  • false: Log disabled
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: Hive Platform
  • KAK: Kakao
  • LIN: Line
  • STE: Steam
  • EPI: Epic Store
  • FAS: FastSprint
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.
  • GO: Google PlayStore
  • AP: Apple AppStore
  • ON: OneStore
  • AM: Amazon AppStore
  • LE: Com2us Lebi
  • HS: Hive Store
  • GA: Samsung GalaxyStore
  • HU: Huawei AppGallery
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.
  • true: Apply COPPA ageGateU13 in the Hive SDK
  • false: Do not apply COPPA ageGateU13 in the Hive SDK
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.
  • If device is selected, the terms agreement popup will be displayed during the initialization step of AuthV4.setup(), and agreement will be obtained only once based on the device. Once agreement is obtained based on the device, the user will not be asked for agreement again even if they log in with a different account on the same device. You can clear the agreement record with resetAgreement().
  • If account is selected, the terms agreement popup will be displayed during login, and agreement will be obtained only once per PlayerId. This can only be used when COPPA ageGateU13 is not applied. The agreement record cannot be cleared with resetAgreement(). Marketing tracking tools will operate from the time of agreement.
device
enableGameController Windows Hive SDK Common This feature sets whether to enable the 'game controller' in the UI provided by the Hive SDK.
  • true: Enables game controller functionality.
  • false: Disables game controller functionality.
The last value is remembered in the configuration file, and the current value can be checked through the get function.
true
usePrivateBrowsingForAuth Windows Authentication This determines whether to use incognito mode during Google login authentication.
  • true: Uses incognito mode authentication.
  • false: Uses normal mode authentication.
It operates with the initial value of hive_config.xml and is only supported in the PC SDK.
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.
  • real: Operating server
  • sandbox: Test server
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.
  • true: Enable logs
  • false: Disable logs
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.
  • C2S: Hive platform
  • KAK: Kakao
  • LIN: Line
  • STE: Steam
  • EPI: Epic Store
  • FAS: FastSprint
O C2S
market Android, iOS, Windows Hive SDK Common The market for processing in-app purchase payments. Used for Hive SDK analytics collection.
  • GO: Google PlayStore
  • AP: Apple AppStore
  • ON: OneStore
  • AM: Amazon AppStore
  • LE: Com2us Lebi
  • HS: Hive Store
  • GA: Samsung GalaxyStore
  • HU: Huawei AppGallery
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.
  • true: Apply COPPA ageGateU13 in the Hive SDK
  • false: Do not apply COPPA ageGateU13 in 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.
  • If device is selected, the terms agreement popup will be displayed during the initialization step of AuthV4.setup(), and agreement will be obtained once based on the device. Once agreement is obtained based on the device, the user will not be asked for agreement again even if they log in with a different account on the same device. The agreement record can be cleared with resetAgreement().
  • If account is selected, the terms agreement popup will be displayed during login, and agreement will be obtained once per PlayerId. This can only be used when COPPA ageGateU13 is not applied. The agreement record cannot be cleared with resetAgreement(). Marketing tracking tools will operate from the time agreement is obtained.
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.
  • true: Activates the game controller feature.
  • false: Deactivates the game controller feature.
The last value is remembered in the configuration file, and the current value can be checked through the get function.
X true
usePrivateBrowsingForAuth Windows Authentication Determines whether to use incognito mode during Google login authentication.
  • true: Uses incognito mode authentication.
  • false: Uses normal mode authentication.
Operates with the initial value of hive_config.xml and is only supported in the PC SDK.
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.
  • true: Display
  • false: Do not display
X true
company Android, iOS, Windows Hive SDK Common (deprecated from v4.23.0)
The name of the game publishing company.
X None