Android

创建一个新的/app/res/raw/hive_config.xml文件。然后,将在Hive控制台中注册的AppID、公司名称和游戏语言等信息输入并保存到此文件中。

以下是一个hive_config.xml文件的示例,用于开发支持Google登录和Google Play商店市场支付的应用程序,使用Com2uS的Hive SDK。请参考此示例将相应的信息输入到文件中。有关更多详细信息,请参阅基本配置指南

<properties>

    <!-- Hive SDK common settings: START -->
    <appId>com.sample.your</appId>

    <gameLanguage>en</gameLanguage>

    <!-- Select the server for the Hive platform. sandbox for development, real for production
        (sandbox, real) -->
    <zone>real</zone>

    <!-- Enable or disable logs for internal SDK operations
        (true, false) -->
    <useLog>false</useLog>

    <!-- Company settings
        (C2S: Com2uS, GVI: Com2uS Holdings) -->
    <company>C2S</company>

    <!-- Channel settings
        (C2S: Hive platform) -->
    <channel>C2S</channel>

    <!-- Payment market settings
        (GO: Google Play, LE: Com2us Lebi, AP: Apple App Store) -->
    <market>GO</market>

    <!-- Set the HTTP Connect Timeout used internally by the Hive SDK in seconds
        (Do not change unless necessary) -->
    <httpConnectTimeout>8</httpConnectTimeout>

    <!-- Set the HTTP Read Timeout used internally by the Hive SDK in seconds
        (Do not change unless necessary) -->
    <httpReadTimeout>8</httpReadTimeout>

    <agreementDetermineBase>device</agreementDetermineBase>
    <!-- Hive SDK common settings: END -->

    <!-- Hive SDK feature-specific settings: START -->
    <!-- Authentication feature settings: Use Google authentication -->
    <providers>             
        <google playAppId="123456789012"  clientId="123456789012-abc.apps.googleusercontent.com"  serverClientId="123456789012-abc.apps.googleusercontent.com"  reversedClientId="com.googleusercontent.apps.123456789012-abc"  deviceFlowClientId="331526026701-gn1abq1ev23nqj7rdvvlaamf7ii4f3u9.apps.googleusercontent.com" />
    </providers>
    <!-- Hive SDK feature-specific settings: END -->

</properties>
Info

Hive SDK 设置可以在构建应用程序之前存储在配置文件中,或者可以在运行时(应用程序运行时)更改。有关更多详细信息,请查看 Hive SDK 设置。