Thumb Bar Hand Tour MixSDK Access Instructions - Android

Posted by benjy on Thu, 06 Jun 2019 00:54:47 +0200

Thumb Bar Hand Tour MixSDK Access Instructions - Android

Catalog

1. Relevant configuration
+ 1-1. Download SDK
+ 1-2. Environmental Construction
+ 1-3. Configure Android Manifest. XML
+ 1-4. Configure config.properties

2. Code Implementation
+ 2-1. Initialization of SDK
+ 2-2. Login
+ 2-3. Payment
+ 2-4. Suspension window logout
+ 2-5. Release resources when cancelling
+ 2-6.SDK version
+ 2-7. Game ID
+ Channel ID
+ 2-9. Role creation reporting
+ 2-10. Enter the Game Report
+ 2-11. Role Upgrade Report
+ 2-12. Get out of the game and report
+ 2-13. Account switching

3. Code obfuscation

4. Server-side code
+ 4-1. Aggregate Login Secondary Verification Interface
+ 4-2. Rechargeable callback interface

1. Relevant configuration

1-1. Download SDK

The latest version of SDK: 2.1.1

SDK Download Address: Thumb bar hand Swim MixSDK_Android_v2.1.1.rar

1-2. Environmental Construction

Copy the resource files, jar packages and corresponding configuration files in the SDK code package to the project that needs to call SDK. See Demo Call Processing Example. Please ensure that:

1. MzbMixSDK2.1.1.jar, banksdk2.0.jar and libammsdk.jar exist under lib in the project;

2. There are GameId, ChannelId, Platform, WkGameId, BingHeGameId parameters in the main/assets/config.properties file.

3. Please complete copies of all files under res/anim, res/color, res/drawable, res/drawable-hdpi, res/drawable-xdpi, res/drawable-xxxhdpi, res/drawable-xxxhdpi, res/layout, res/layout-port, res/values folders.

4. Configure the application in AndroidmMainfest.xml

5. Please copy the rights in the AndroidmMainfest.xml file and the relevant Activity and Service registration codes.

1-3. Configure Android Manifest. XML

If the player does not have its own application caton, set the andorid:name attribute of the application node to com.kxyx.KxyxApplication

  <application
        android:name="com.kxyx.KxyxApplication"
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@android:style/Theme.Black.NoTitleBar">

 </application>

If the player has his own application, please overload the following methods and call the relevant code within them.

    @Override
    public void onCreate()
    {
        super.onCreate();
        KxyxSDK.getInstance().onAppCreate(this);
    }

    @Override
    public void attachBaseContext(Context base)
    {
        super.attachBaseContext(base);
        KxyxSDK.getInstance().onAppAttachBaseContext(this, base);
    }

    @Override
    public void onConfigurationChanged(Configuration newConfig)
    {
        super.onConfigurationChanged(newConfig);
        KxyxSDK.getInstance().onAppConfigurationChanged(this, newConfig);
    }

    @Override
    public void onTerminate()
    {
        super.onTerminate();
        KxyxSDK.getInstance().onAppTerminate();
    }

The permissions required to add SDK

    <uses-permission android:name="android.permission.INTERNET"/>
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
    <uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW"/>
    <uses-permission android:name="android.permission.GET_TASKS"/>
    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.CHANGE_WIFI_STATE"/>
    <uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"/>
    <uses-permission android:name="android.permission.CHANGE_CONFIGURATION"/>
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
    <uses-permission android:name="android.permission.SYSTEM_OVERLAY_WINDOW"/>

Register SDK-related Activity & Service, note that it must be placed in the application element block

     <activity
            android:name="com.kxyx.ui.account.RegisterActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"
            android:windowSoftInputMode="stateHidden|adjustResize"/>
        <activity
            android:name="com.kxyx.ui.account.LoginActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"
            android:windowSoftInputMode="stateHidden|adjustResize"/>
        <activity
            android:name="com.kxyx.ui.account.AutoLoginActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>
        <activity
            android:name="com.kxyx.ui.account.CustomerServiceCenterActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>
        <activity
            android:name="com.kxyx.ui.account.RegisterAgreementActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>

        <activity
            android:name="com.kxyx.ui.pay.GameRechargeActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>

        <activity
            android:name="com.kxyx.ui.pay.InputeRechargeAmountActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>
        <activity

            android:name="com.kxyx.ui.account.ForgetPasswordHaveBindPhoneActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>

        <activity
            android:name="com.kxyx.ui.mine.BindPhoneActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>
        <activity
            android:name="com.kxyx.ui.mine.MessageListActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>
        <activity
            android:name="com.kxyx.ui.gift.MyGiftBagActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>
        <activity
            android:name="com.kxyx.ui.mine.RechargeRecordActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>
        <activity
            android:name="com.kxyx.ui.mine.UserCenterActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>

        <activity
            android:name="com.kxyx.ui.mine.ModifyPwdActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>

        <activity
            android:name="com.kxyx.ui.pay.PayActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>
        <activity
            android:name="com.kxyx.ui.pay.PayWayActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>
        <activity
            android:name="com.kxyx.ui.pay.WechatPayActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>
        <activity
            android:name="com.kxyx.ui.pay.UnionPayActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="portrait"/>
        <activity
            android:name="com.kxyx.ui.mine.MessageDetailActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>
        <activity
            android:name="com.kxyx.ui.account.NoticeBindPhoneActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>
        <activity
            android:name="com.kxyx.ui.account.TryPlayActivity"
            android:configChanges="orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@android:style/Theme.Dialog"/>

        <service android:name="com.kxyx.service.SDKService"/>

        <!-- The following is a third-party payment SDK Activity&Service To configure -->
        <activity
            android:name="com.alipay.sdk.app.H5PayActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"/>
        <activity
            android:name="com.alipay.sdk.auth.AuthActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"/>


        <activity android:name="com.wk.game.ui.InitActivity"
                  android:configChanges="orientation|keyboardHidden|screenSize"
                  android:screenOrientation="landscape"
                  android:launchMode="singleTask"/>


        <activity android:name="com.wk.game.ui.DialogWebActivity"
                  android:label="@string/title_activity_dialog_web"
                  android:theme="@style/dialog_activity"
                  android:configChanges="orientation|keyboardHidden|screenSize"
                  android:screenOrientation="landscape"
                  android:windowSoftInputMode="stateHidden|adjustResize"
                  android:launchMode="singleTask"/>

        <activity android:name="com.wk.game.ui.CustomWebActivity"
                  android:configChanges="keyboardHidden|orientation|screenSize"
                  android:theme="@style/web_activity"
                  android:screenOrientation="portrait"
                  android:launchMode="singleTask"/>

        <service android:name="com.wk.game.xuanfu.ShowFloatWindowService"/>

       <activity
            android:name="com.binghe.sdk.activity.LoginActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="landscape"
            android:theme="@style/translucent"/>

        <service
            android:name="com.binghe.sdk.service.FloatViewService"
            android:exported="false"/>

        <activity
            android:name="com.binghe.sdk.activity.PayActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="portrait"/>

        <activity
            android:name="com.binghe.sdk.activity.MessageActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="portrait"/>

        <activity
            android:name="com.binghe.sdk.activity.H5WebActivity"
            android:configChanges="screenSize|orientation|keyboardHidden|navigation"
            android:exported="false"
            android:screenOrientation="portrait"/>

Activeness of this SDK supports horizontal and vertical screens. Activity can be configured no less than screenSize | orientation | keyboard Hidden | navigation. These configurations are added to prevent activity from being rebuilt when it is forced into a vertical screen by the system or third-party interface, because activity rebuilding may occur crash due to some incomplete initialization.
Note: Activeness of this SDK requires mandatory configuration of horizontal and vertical screens in Android Manifest. xml. (Horizontal screen configuration: android: screen Orientation = "landscape" and vertical screen configuration: android: screen Orientation = "portrait")

1-4. Configure config.properties

Several parameters in the configuration file must be configured as follows

Game ID

GameId = 1

Channel ID

ChannelId = 3. ps: Don't ask what to fill in, fill in 3)

Platform ID

Platform= 100 (Players do not need to modify to fill in 100 directly, remember not to be empty. ps: Don't ask what to fill in, fill in 100)

Goku Game ID

WkGameId = 1000000005

Ice Age Game ID

BingHe GameId = 100004 (ask SDK stakeholders about the game BingHe GameId)

2. Code Implementation

2-1. Initialization of SDK

SDK must be initialized before it can be used. Initialization is recommended during game initialization.

       instance = KxyxSDK.getInstance().init(this);
       /**
        * Initialize SDK callback
        */
       instance.setOnInitListener(new KxyxSDK.onInitListener()
       {
           @Override
           public void onInitSuccess(String msg)
           {
               Log.e("onInitSuccess", msg);//Successful initialization
           }

           @Override
           public void onInitFail(int errorCode, String msg)
           {
               Log.e("onInitFail", errorCode + "");//initialization failed
           }
       });


      /**
       * Add this method to onStart
       */
       @Override
       protected void onStart()
           instance.onStart();
           super.onStart();
       }

      /**
       * Add this method to onResume
       */
       @Override
       protected void onResume()
       {
           instance.onResume(this);
           super.onResume();
       }

       /**
       * Add this method to onPause
       */
       @Override
       protected void onPause()
       {
           instance.onPause();
           super.onPause();
       }

       /**
       * Add this method to onNewIntent
       */
       @Override
       protected void onNewIntent(Intent intent)
       {
           instance.onNewIntent(intent);
           super.onNewIntent(intent);
       }

       /**
       * Add this method to onStop
       */
       @Override
       protected void onStop()
       {
           instance.onStop();
           super.onStop();
       }

      /**
       * Add these methods to onBackPressed
       */
       public void onBackPressed()
       {
           instance.hideFloatingView();
           instance.unBindService(this);
           super.onBackPressed();
       }

       /**
       * Add this method to onDestroy
       */
       @Override
       public void onDestroy()
       {
           instance.onDestroy(this);
           super.onDestroy();
       }

      /**
       * Add these methods to onRestart
       */
       @Override
       protected void onRestart()
       {
           instance.onRestart();
           super.onRestart();
       }

      /**
       * Add these methods to onRequest Permissions Result
       */
       @Override
       public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults)
       {
           instance.onRequestPermissionsResult(requestCode, permissions, grantResults);
           super.onRequestPermissionsResult(requestCode, permissions, grantResults);
       }

      /**
       * Add these methods to onActivityResult
       */
       @Override
       protected void onActivityResult(int requestCode, int resultCode, Intent data)
       {
           instance.onActivityResult(requestCode, resultCode, data);
           super.onActivityResult(requestCode, resultCode, data);
       }

2-2. Login

       instance.login(this);
       /**
        * Login callback
        * 
        * UserInfoMixBean Detailed explanation of parameters
        * uid: Unique identifier
        * username: User name
        * platformId: Platform Id
        * token:Token (used for login secondary authentication)
        */
       instance.setOnLoginMixListener(new KxyxSDK.onLoginMixListener()
       {
            @Override
            public void onSuccess(UserInfoMixBean userInfoMixBean)
            {
                 Log.e("login-onSuccess", userInfoMixBean.toString());//Successful login
            }

            @Override
            public void onFail(String msg)
            {
                 Log.e("onFail", msg);//Logon failure
            }
      });

2-3. Payment

Payments are4Three overloading methods.
//For payment results, merchants are asked to rely on the asynchronous notification results of the server. Synchronized notification results are used only as notifications of the end of payment.
     /**
      * context: Current context object
      * amount: Payment amount parameter (payment amount can only be an integer). Unit element
      * goods: Commodity name (default: game recharge)
      * goods_desc: Product description (default: game recharge)
      * game_order_sn: Game Payment Order Number
      * game_api_url: Payment result asynchronous notification url
      * game_zone: Game area clothing name
      * role_name: Role Name
      * game_zone_id: Game area uniform id
      * role_id: Role id
      * goods_id:Commodity id
      * coin_num: Number of game currency currently owned by the current character
      * level: Role Level
      * vip: Role vip level
      * ext: Extended parameters, do not participate in signature, can not pass (user recharge success, when callback game side with this parameter, game side can according to their own needs to pass the value of this parameter)
      */
      pay(Context context, String amount, String goods, String goods_desc, String game_order_sn, String game_api_url, String game_zone, String role_name, String game_zone_id, String role_id, String goods_id, String coin_num, String level, String vip, String ext);

      /**
      * No goods, goods_desc, ext parameters
      */
      instance.pay(this, amount, game_order_sn, gane_api_url, game_zone, role_name, game_zone_id, role_id, goods_id, coin_num, level, vip);

      /**
      * Containing ext parameters
      */
      instance.pay(this, amount, game_order_sn, gane_api_url, game_zone, role_name, game_zone_id, role_id, goods_id, coin_num, level, vip, ext);

      /**
      * Including goods, goods_desc parameters
      */
      instance.pay(this, amount, goods, goods_desc, game_order_sn, gane_api_url, game_zone, role_name, game_zone_id, role_id, goods_id, coin_num, level, vip);

      /**
      * Containing goods, goods_desc, ext parameters
      */
      instance.pay(this, amount, goods, goods_desc, game_order_sn, gane_api_url, game_zone, game_zone_id, role_id, role_name, goods_id, coin_num, level, vip, ext);

      /**
       * Payment callback
       * 
       * status Explain:
       *   0: To be paid;
       *   1: Payment made;
       *   2: Unpaid;
       *   3: Other causes of failure (e.g. network anomalies, etc.).
       * If the state returns a value of 3, then msg will have a value that explains why it failed.
       */
      instance.setOnPayListener(new KxyxSDK.onPayListener()
      {
          @Override
          public void onResponse(PayStateBean payStateBean)
          {
               switch (payStateBean.getState())
               {
                   case "0":
                        Log.e("status", "Payment to be made");
                        break;
                   case "1":
                        Log.e("status", "Payment made");
                        break;
                   case "2":
                        Log.e("status", "Unpaid");
                        break;
                   case "3":
                        Log.e("status", payStateBean.getMsg());
                        break;
                }
          }
      });

2-4. Suspension window logout

       /**
        * Suspension window exit logon callback
        */
        instance.setOnLogoutListener(new KxyxSDK.onLogoutListener()
        {
            @Override
            public void onResponse()
            {
                Toast.makeText(MainActivity.this, "Log out", Toast.LENGTH_SHORT).show();
            }
        });

2-5. Release resources when cancelling

Exit login. When you exit the game, call this method (if you exit login from the suspension window, you don't need to)

        instance.releaseAllResourse(context);
       /**
        *Release resource callback during write-off
        */
        instance.setOnReleaseAllResourseListener(new KxyxSDK.onReleaseAllResourseListener()
        {
             @Override
             public void onReleaseSuccess(String msg)
             {
                 Log.e("onReleaseSuccess", msg);
             }

             @Override
             public void onReleaseFail(String msg)
             {
                 Log.e("onReleaseFail", msg);
             }
        });

2-6.SDK version

       /**
        * Get the current SDK version
        */
        instance.getVersion();

2-7. Game ID

       /**
        * To the current game ID
        */
        instance.getGameId();

Channel ID

       /**
        * Get the current channel ID
        */
        instance.getChannelId();

2-9. Role creation reporting

When creating roles, be sure to call roles to create the reporting interface

       /**
        * server_name: District uniform name
        * server_id: District uniform id
        * create_role_time: Role creation time (pass a timestamp), for example: String. valueOf (System. current Time Millis ())
        * role_name: Role Name
        * role_id: Role id
        * level: Role Level
        */
        instance.reportCreateRole(server_name, server_id, create_role_time, role_name, role_id, level);

       /**
        * Role Creation Reporting Callback
        */
        instance.setOnCreateRoleListener(new KxyxSDK.onCreateRoleListener()
        {
            @Override
            public void onSuccess(ReportBean reportBean)
            {
                Log.e("onSuccess", "" + reportBean.toString());
            }

            @Override
            public void onFail(String msg)
            {
                Log.e("onFail", "" + msg);
            }
        });

2-10. Enter the Game Report

When entering the game, be sure to call the Entry Report Interface.

       /**
        * server_name: District uniform name
        * server_id: District uniform id
        * role_name: Role Name
        * role_id: Role id
        * level: Role Level
        * coin_num: Number of game currencies owned by current characters
        */
        instance.reportEnterGame(server_name, server_id, role_name, role_id, level, coin_num);

2-11. Role Upgrade Report

Be sure to invoke the role upgrade reporting interface when upgrading roles

       /**
        * server_name: District uniform name
        * server_id: District uniform id
        * role_name: Role Name
        * role_id: Role id
        * level: Role Level
        * coin_num: Number of game currencies owned by current characters
        */
        instance.reportUpgrade(server_name, server_id, role_name, role_id, level, coin_num);

       /**
        * Role Upgrade Return Callback
        */
        instance.setOnUpgradeListener(new KxyxSDK.onUpgradeListener()
        {
              @Override
              public void onSuccess(ReportBean reportBean)
              {
                  Log.e("onSuccess", "" + reportBean.toString());
              }

              @Override
              public void onFail(String msg)
              {
                   Log.e("onFail", "" + msg);
              }
        });

2-12. Get out of the game and report

Be sure to call the exit report interface when you exit the game

       /**
        * server_name: District uniform name
        * server_id: District uniform id
        * role_name: Role Name
        * role_id: Role id
        * level: Role Level
        * coin_num: Number of game currencies owned by current characters
        */
        instance.reportQuitGame(server_name, server_id, role_name, role_id, level, coin_num);

2-13. Account switching

       /**
        *  Callback for switching to a new account via SDK
        *  Gamers need to guide users to re-login and reload the new user's role data.
        */
        instance.setOnSwitchAccountListener(new KxyxSDK.onSwitchAccount()
        {
            @Override
            public void onResponse(UserInfoMixBean userInfoMixBean)
            {
                Toast.makeText(MainActivity.this, "Account switching", Toast.LENGTH_SHORT).show();
            }
        });

3. Code obfuscation

If your application uses obfuscation, do not obfuscate the SDK code, you can add the following configuration in the obfuscation file.

-dontwarn com.kxyx.**
-keep class com.kxyx.**{*;}
#The following is the tripartite confusion configuration
-keep class com.alipay.android.app.IAlixPay{*;}
-keep class com.alipay.android.app.IAlixPay$Stub{*;}
-keep class com.alipay.android.app.IRemoteServiceCallback{*;}
-keep class com.alipay.android.app.IRemoteServiceCallback$Stub{*;}
-keep class com.alipay.sdk.app.PayTask{ public *;}
-keep class com.alipay.sdk.app.AuthTask{ public *;}
-keep class cn.sharesdk.**{*;}
-keep class com.sina.**{*;}
-keep class **.R$* {*;}
-keep class **.R{*;}
-keep class com.mob.**{*;}
-dontwarn com.mob.**
-dontwarn cn.sharesdk.**
-dontwarn **.R$*
-dontwarn com.zhy.http.**
-keep class com.zhy.http.**{*;}
-dontwarn okhttp3.**
-keep class okhttp3.**{*;}
-dontwarn okio.**
-keep class okio.**{*;}
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
  **[] $VALUES;
-keepattributes Signature
-keep class sun.misc.Unsafe { *; }
-keep class com.google.gson.examples.android.model.** { *; }
-keep class com.google.**{*;}
-keep class com.wk.game.** {*;}
-keepclassmembers class com.wk.sdk.lib.R$* {*;}

4. Server-side code

4-1. Aggregate Login Secondary Verification Interface

Brief description

Aggregate Login Secondary Verification Interface

Request URL

http://www.sdk.muzhi8.com/api.php?m=public&a=together_login

Request mode

POST/GET

parameter

Parameter name type Explain
uid string Unique identifier (SDK login successfully returned, userInfoMixBean.getUid();)
platform string Channel ID (SDK login successfully returned, userInfoMixBean.getPlatformId();)
token string User token ID (SDK login successfully returned, fill in for space-time: 1, userInfoMixBean.getToken();)
appid string Application id (SDK login successfully returned, fill in for space-time: 1, userInfoMixBean.getGameId();)
username string Username (SDK login successfully returned, fill in for space-time: 1, userInfoMixBean.getUserName();)
time string Time stamp at that time (accurate to seconds)
game_id string Game id (SDK login successfully returned, userInfoMixBean.getGameId();)
sign string Signature string md5(uid+platform+token+appid+username+time+game_id+key) Note: key is provided by us, and the string is lowercase after md5. + No. is a conjunction symbol and does not participate in signature.

Return an example

{
    code: 0,
    msg: "success",
    data: {
        uid: 1000010028,
        nickname: "Xue Yuan"
    }
}

Return parameter description

Parameter name type Explain
code int Return code 0 indicates success
msg int Error message returned when return code is not 0
data int Return information when return code is 0

4-2. Rechargeable callback interface

Brief description

Rechargeable callback interface

Request URL

Provided by the player

Request mode

GET

parameter

Parameter name type Explain
game_order_sn string Game Order Number
money int Amount of recharge (unit: points)
status int Recharge status: 0 recharge failure; 1: recharge success
msg string Remarks on Recharge
createtime int Recharge time
ext string Pass-through field
username string Recharge username or user id
order_sn string Platform Order Number
sign string Signature string md5(game_order_sn+money+status+createtime+key) Note: key is provided by us, and the string is lowercase after md5. + No. is a conjunction symbol and does not participate in signature.

Return an example

Successful output of lowercase string: success failed output of lowercase string fail

Topics: Android SDK xml Google