02/25/2025 15:42:56
Function Module
I. List of Channels Supported by Every Module
module | Function description | channel list |
---|---|---|
Login module | authorized login | (1) WeChat (2) QQ (3) Guest (4) Facebook (5) GameCenter (6) Google (7) Twitter (8) Garena (9) Line (10) Apple (11) Kwai (12) HMS |
Friend module | Friends | MSDK provides functions for getting personal information and adding QQ friends |
Share Module | Send or share messages | (1) WeChat (2) QQ (3) Facebook (4) Twitter (5) System (6) Line (7) WhatsApp (8) Kwai (9) Instagram |
Group module | Create and get union information | (1) WeChat (2) QQ |
Notice module | notice | notice service provided by MSDK |
Push module | message push | (1) TPNS - Tencent cloud version (2) Firebase |
Event Reporting Module | Integrate various data reporting components | (1) Adjust (2) AppsFlyer (3) Beacon (4) TDM (5) Facebook (6) Firebase |
Exception Reporting Module | Integrated exception reporting components | (1) Bugly (2) Firebase |
WebView | Browse web pages, and allow native applications to communicate with WebView | Android supports X5 and the system kernel, and iOS provides the system kernel |
LBS module | The Location module provides the function related to the player's location | (1) WeChat (2) QQ |
Tools module | tool service, such as test if app has been installed | provided by MSDK |
Extension Module | Extension service | MSDK provides the functions for encapsulating the existing MSDK interfaces that cannot be reused |
II. Integrate Function Module
After completing the integration of basic SDK, you also need to download plugins according to your needs. For example, WeChat login needs to download WeChat plugin, Facebook login needs to download Facebook plugin, etc. Copy the plugins to the corresponding project dependencies, modify the corresponding plugin configuration in the MSDK environment configuration, and then initialize SDK environment. After this, you can call various functions provided by MSDK.
III. Basic Data Struct
3.1 MSDKBaseRet explanation
The basic struct of MSDK callback; all callback result classes are inherited from it; it includes some basic information.
member variable name | type | Description |
---|---|---|
MethodNameId | int | Method tag for the called interface; it corresponds to MSDKMethodNameID enumeration |
RetCode | int | MSDK's return code; for details, refer to MSDKError class |
RetMsg | string | MSDK description information |
ThirdCode | int | third-party channel return code |
ThirdMsg | string | third-party channel description information |
ExtraJson | string | extended field |
IV. Enumeration and description of every method name
4.1 Details about MSDKMethodNameID
C#
C++
public enum MSDKMethodNameID
{
MSDK_METHODNAMEID_UNDEFINE = 000, // Method name which is not defined
// Login
MSDK_LOGIN_AUTOLOGIN = 111, // Automatic login
MSDK_LOGIN_LOGIN = 112, // Authorized login
MSDK_LOGIN_BIND = 113, // Bind
MSDK_LOGIN_GETLOGINRESULT = 114, // Get the login status
MSDK_LOGIN_SWITCHUSER = 115, // Account exchange
MSDK_LOGIN_QUERYUSERINFO = 116, // Get the personal information
MSDK_LOGIN_LOGOUT = 117, // Logout
MSDK_LOGIN_LOGINWITHCONFIRMCODE = 118, // Login with the confirmation code
MSDK_LOGIN_WAKEUP = 119, // Account inconsistency, such as launch from the Game Center, and launch from the invitation
MSDK_METHOD_SCHEME = 120, // Launch from a third-party APP
MSDK_LOGIN_RESETGUEST = 121, // Reset the guest account
// Friend
MSDK_FRIEND_SHARE = 211, // Share messages to the information wall, such as WeChat Moment, QZone and Facebook
MSDK_FRIEND_SEND_MESSAGE = 212, // Share messages to friends
MSDK_FRIEND_QUERY_FRIEND = 213, // Get a friend's information. The client cancels the interface
MSDK_FRIEND_ADD_FRIEND = 214, // Add a friend
// Group
MSDK_GROUP_CREATE = 311, // Establish a group
MSDK_GROUP_BIND = 312, // Bind a group
MSDK_GROUP_GET_GROUP_LIST = 313, // Get the group list of the president
MSDK_GROUP_GET_GROUP_STATE = 314, // Get the group status
MSDK_GROUP_JOIN = 315, // Join an existing group
MSDK_GROUP_UNBIND = 316, // Unbind a group
MSDK_GROUP_REMIND_TO_BIND = 317, // Remind the president to establish a group
MSDK_GROUP_SEND_GROUP_MESSAGE = 318, // Send the group's messages
MSDK_GROUP_GET_GROUP_RELATION = 319, // Get group relations
// Webview
MSDK_WEBVIEW_CLOSE = 411, // Close the webpage
MSDK_WEBVIEW_GET_ENCODE_URL = 412, // Get an encrypted token
MSDK_WEBVIEW_JS_CALL = 413, // Native calls JS code
MSDK_WEBVIEW_JS_SHARE = 414, // JS Share messages to the information wall, such as WeChat Moment, QZone and Facebook
MSDK_WEBVIEW_JS_SEND_MESSAGE = 415, // JS shares messages to friends
// Push
MSDK_PUSH_REGISTER_PUSH = 511, // Register a push
MSDK_PUSH_UNREGISTER_PUSH = 512, // Cancel a push
MSDK_PUSH_SET_TAG = 513, // Register a tag push
MSDK_PUSH_DELETE_TAG = 514, // Cancel a tag push
MSDK_PUSH_ADD_LOCAL_NOTIFICATION = 515, // Add a local push
MSDK_PUSH_CLEAR_LOCAL_NOTIFICATION = 516,// Clear a local push
MSDK_PUSH_NOTIFICAITON_CALLBACK = 517, // Push callback
MSDK_PUSH_NOTIFICATION_SHOW = 518, // Show the push message
MSDK_PUSH_NOTIFICATION_CLICK = 519, // Click the notification message
MSDK_PUSH_SET_ACCOUNT = 520, // Set a push account
MSDK_PUSH_DELETE_ACCOUNT = 521, // Delete a push account
// Notice
MSDK_NOTICE_LOAD_DATA = 611, // Get notice data
// Game
MSDK_GAME_SETUP = 711, // Initialize the leaderboard function
MSDK_GAME_SHOW_LEADER_BOARD = 712, // Show the leaderboard UI
MSDK_GAME_SET_SCORE = 713, // Set the score
MSDK_GAME_SHOW_ACHIEVEMENT = 714, // Show achievement ranking
MSDK_GAME_UNLOCK_ACHIEVE = 715, // Unlock the specified achievement
// Tool
MSDK_TOOLS_FREE_FLOW = 913, // Free-traffic interface
// Crash
MSDK_CRASH_CALLBACK_EXTRA_DATA = 1011, // Additional binary data during Crash
MSDK_CRASH_CALLBACK_EXTRA_MESSAGE = 1012, // Additional logs during Crash
}
typedef enum MethodName
{
kMethodNameUndefine = 000, // Method name which is not defined
kMethodNameAutoLogin = 111, // Automatic login
kMethodNameLogin = 112, // Authorized login
kMethodNameBind = 113, // Bind
kMethodNameGetLoginRet = 114, // Get the login status
kMethodNameSwitchUser = 115, // Account exchange
kMethodNameQueryUserInfo = 116, // Get the personal information
kMethodNameLogout = 117, // Logout
kMethodNameLoginWithConfirmCode = 118, // Login with the confirmation code
kMethodNameWakeUp = 119, // Launch from the Game Center
KMethodNameScheme = 120, // Launch from a third-party APP
kMethodNameResetGuest = 121, // Reset the guest account
kMethodNameShareToWall = 211, // Share messages to the information wall, such as WeChat Moment, QZone and Facebook
kMethodNameSendMessageToFriend = 212, // Share messages to friends
kMethodNameQueryFriend = 213, // Get a friend's information
kMethodNameAddFriend = 214, // Add a friend
kMethodNameCreateGroup = 311, // Establish a group
kMethodNameBindGroup = 312, // Bind a group
kMethodNameGetGroupList = 313, // Get the group list of the president
kMethodNameGetGroupState = 314, // Get group relations
kMethodNameJoinGroup = 315, // Join an existing group
kMethodNameUnbindGroup = 316, // Unbind a group
kMethodNameRemindToBindGroup = 317, // Remind the president to bind the group
kMethodNameSendMessageToGroup = 318, // Send the group's messages
kMethodNameGetGroupRelation = 319, // Get group relations
kMethodNameCloseWebViewURL = 411, // Close the webpage
kMethodNameGetEncodeURL = 412, // Get an encrypted token
kMethodNameWebViewJsCall = 413, // Native calls JS code
kMethodNameWebViewJsShare = 414, // JS Share messages to the information wall, such as WeChat Moment, QZone and Facebook
kMethodNameWebViewJsSendMessage = 415, // JS Share messages to friends
kMethodNameWebViewEmbedProgress = 416, // Open the embedded browser's progress
kMethodNameRegisterPush = 511, // Register a push
kMethodNameUnregisterPush = 512, // Cancel a push
kMethodNameSetTagForPush = 513, // Register a tag push
kMethodNameDeleteTagForPush = 514, // Cancel a tag push
kMethodNameAddLocalNotify = 515, // Add a local push
kMethodNameClearLocalNotify = 516, // Clear a local push
kMethodNameNotifyCallback = 517, //
kMethodNameNotifyShow = 518, //
kMethodNameNotifyClick = 519, //
kMethodNameSetAccountPush = 520, //
kMethodNameDeleteAccountPush = 521, //
kMethodNameLoadNoticeData = 611, // Get notice data
kMethodNameSetupGame = 711, // Initialize the leaderboard function
kMethodNameShowGameLeaderBoard = 712, // Show the leaderboard UI
kMethodNameSetScore = 713, // Set the score
kMethodNameShowGameAchievement = 714, // Show achievement ranking
kMethodNameUnlockGameAchieve = 715, // Unlock the specified achievement
KMethodNameToolsOpenDeepLink = 911, // Open DeepLink
KMethodNameToolsConvertShortUrl = 912, // Convert the short link
KMethodNameToolsGetFreeFlowInfo = 913, // Get the information about free stream
kMethodNameCrashExtraData = 1011, // Additional binary data
kMethodNameCrashExtraMessage = 1012, // Additional logs
}MethodName;
Copyright © 2025 MSDK.
All rights reserved.
All rights reserved.