Open AMS Activity Center (OpenAmsCenter) (MSDK only)
[MSDK only] Opens the AMS Activity Center.
Supported Platforms
- Unity
- Unreal Engine
Supports
Android, iOS platform.Supports
Android, iOS platform.Function Definition
- Unity
- Unreal Engine
void OpenAmsCenter(string gameName,
string actChannelId,
string zoneId,
string platformId,
string partitionId,
string roleId,
int screenType = 1,
string extraJson = "");
static void OpenAmsCenter(
const std::string &game_name,
const std::string &act_channel_id,
const std::string &zone_id,
const std::string &platform_id,
const std::string &partition_id,
const std::string &role_id,
int screen_type = 1,
const std::string &extra_json = "{}");
Input Parameters
- Unity
- Unreal Engine
| Parameters | Type | Description |
|---|---|---|
| gameName | string | Business Code Abbreviation Each business is unique and is assigned a distinct code by the system when accessing the AMS platform |
| actChannelId | string | Activity Channel ID Each business can log in to the "AMS Management Terminal" to obtain it |
| zoneId | string | User region server information |
| platformId | string | Platform ID 0: iOS 1: Android |
| partitionId | string | User region server information |
| roleId | string | Role ID |
| screenType | int | Screen orientation 1: Landscape and portrait 2: Portrait 3: Landscape |
| extraJson | string | Extended Field |
| Parameters | Type | Description |
|---|---|---|
| game_name | std::string | Business Code Abbreviation Each business is unique and is assigned a distinct code by the system when accessing the AMS platform |
| act_channel_id | std::string | Activity Channel ID Each business can log in to the "AMS Management Terminal" to obtain it |
| zone_id | std::string | User region server information |
| platform_id | std::string | Platform ID 0: iOS 1: Android |
| partition_id | std::string | User region server information |
| role_id | std::string | Role ID |
| screen_type | int | Screen orientation 1: Landscape and portrait 2: Portrait 3: Landscape |
| extra_json | std::string | Extended Field |
Callback Handling
The callback handling interface is GUAWebViewResultObserver.The callback data structure is GUAWebViewRet.
- Unity
- Unreal Engine
The callback event is WebViewRetEvents. Callback ID is GUA_WEBVIEW_CLOSE_URL.
The callback event is OnWebViewOptNotify. The callback ID is kMethodIDWebviewCloseURL.
Code Example
- Unity
- Unreal Engine
UnionAdapterAPI.GetWebViewService().OpenAmsCenter("jxqy","jxqy_comm", "2", "0", "1", "role");
GUA_NAMESPACE::GUAWebViewService::OpenAmsCenter("jxqy", "jxqy_comm", "2", "0", "1", "role");