打开 ams 活动中心(OpenAmsCenter)(仅限 MSDK)
[仅限 MSDK] 打开 ams 活动中心。
支持的平台
- Unity
 - Unreal Engine
 
支持
Android, iOS 平台。支持
Android, iOS 平台。函数定义
- 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 = "{}");
入参说明
- Unity
 - Unreal Engine
 
| 参数 | 类型 | 说明 | 
|---|---|---|
| gameName | string | 业务代码的缩写 每个业务是不同的,每个业务是系统在访问AMS平台时分配的  | 
| actChannelId | string | 活动通道ID 各业务可登录【中间娱乐AMS】管理终端获取  | 
| zoneId | string | 用户区域服务器信息 | 
| platformId | string | 平台 ID  0: iOS 1: Android  | 
| partitionId | string | 用户区域服务器信息 | 
| roleId | string | 角色 ID | 
| screenType | int | 屏幕方向 1: 横屏和竖屏 2: 竖屏 3: 横屏  | 
| extraJson | string | 扩展字段 | 
| 参数 | 类型 | 说明 | 
|---|---|---|
| game_name | std::string | 业务代码的缩写 每个业务是不同的,每个业务是系统在访问AMS平台时分配的  | 
| act_channel_id | std::string | 活动通道ID 各业务可登录【中间娱乐AMS】管理终端获取  | 
| zone_id | std::string | 用户区域服务器信息 | 
| platform_id | std::string | 平台 ID  0: iOS 1: Android  | 
| partition_id | std::string | 用户区域服务器信息 | 
| role_id | std::string | 角色 ID | 
| screen_type | int | 屏幕方向 1: 横屏和竖屏 2: 竖屏 3: 横屏  | 
| extra_json | std::string | 扩展字段 | 
回调处理
回调处理接口是 GUAWebViewResultObserver。回调数据结构是 GUAWebViewRet。
- Unity
 - Unreal Engine
 
回调事件是 WebViewRetEvents 。 回调 ID 是 GUA_WEBVIEW_CLOSE_URL。
回调事件是 OnWebViewOptNotify 。 回调 ID 是 kMethodIDWebviewCloseURL。
代码示例
- Unity
 - Unreal Engine
 
UnionAdapterAPI.GetWebViewService().OpenAmsCenter("jxqy","jxqy_comm", "2", “0”, “1”, "role");
GUA_NAMESPACE::GUAWebViewService::OpenAmsCenter("jxqy", "jxqy_comm", "2", "0", "1", "role");