Get Notice Data (RequestNoticeData)
Get Notice Data
Function Definition
public static string RequestNoticeData(string region, string langType, string extraJson = "{}");
Input Parameters
| Parameters | Type | Explanation |
|---|---|---|
| region | string | Numeric code for country or region according to ISO 3166-1 For example, 156 represents China, 040 represents Austria Set to 0 to retrieve announcements for all regions |
| langType | String | Language type (RFC 4646), for example "en", used to specify the language for sending emails and SMS For details, see Language Type Definition |
| extraJson | String | Extended information used to pass custom tag and other parameters |
Callback processing
The callback processing interface is NoticeResultObserver.The callback data structure is NoticeResult.
The callback ID is INTL_NOTICE_REQUEST_DATA.
Code example
string seqid = INTLAPI.RequestNoticeData("0", "zh-Hans", extraJson);
Notice custom tag configuration
Player Network only supports configuring custom tags for announcements of custom types; template types such as "pre-login announcement" and "post-login announcement" are not supported.
This feature is disabled by default. Please contact the Player Network Assistant to enable the backend switch if you need to use it.
The key-value pairs passed by the client must match the console configuration exactly.
Feature description
In notices, custom tags can be personalized for announcements based on different conditions like platform, user groups, and app versions.
Configuration steps
-
Custom tags can be configured in the Player Network Console. For details, see Announcement Custom Attributes.
-
After configuration, you can achieve precise matching by passing key-value pairs in the
ExtraJsonparameter ofRequestNoticeDatathat are consistent with the console configuration.The Key and Value of custom tags can be customized according to business requirements and are not limited to SDK predefined fields.
Code sample
// Pass custom tag: key = "custom_key", value = "custom_value"
string seqid = INTLAPI.RequestNoticeData("0", "zh-Hans", "{\"custom_key\":\"custom_value\"}");