Android

創建一個新的/app/res/raw/hive_config.xml文件。然後,將在Hive控制台中註冊的AppID、公司名稱和遊戲語言等信息輸入並保存到此文件中。

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

<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 設定。