OpenAmsCenter (MSDK Only)
[MSDK Only] Opens AMS which provides rich marketing services and apps.
Supported Platform
- 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
Parameter | Type | Description |
---|---|---|
gameName | string | Game identifier abbreviation Different for each game and is assigned while visiting AMS. |
actChannelId | string | Campaign channel ID Log in to AMS to get the ID. |
zoneId | string | Regional server ID |
platformId | string | Platform ID 0: iOS 1: Android |
partitionId | string | Zone ID |
roleId | string | Role ID |
screenType | int | Screen orientation 1: Landscape and portrait 2: Portrait 3: Landscape |
extraJson | string | Extended field |
Parameter | Type | Description |
---|---|---|
game_name | std::string | Game identifier abbreviation Different for each game and is assigned while visiting AMS. |
act_channel_id | std::string | Campaign channel ID Log in to AMS to get the ID. |
zone_id | std::string | Regional server ID |
platform_id | std::string | Platform ID 0: iOS 1: Android |
partition_id | std::string | Zone ID |
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 Processing
The callback processing API is GUAWebViewResultObserver. The callback data structure is GUAWebViewRet.
- Unity
- Unreal Engine
The callback event is WebViewRetEvents.
The callback methodID is GUA_WEBVIEW_CLOSE_URL
.
The callback event is OnWebViewOptNotify.
The callback methodID is kMethodIDWebviewCloseURL
.
Code Sample
- Unity
- Unreal Engine
UnionAdapterAPI.GetWebViewService().OpenAmsCenter("jxqy","jxqy_comm", "2", “0”, “1”, "role");
GUA_NAMESPACE::GUAWebViewService::OpenAmsCenter("jxqy", "jxqy_comm", "2", "0", "1", "role");