Skip to main content

Get Notice Data (NoticeRequestData)

AndroidiOSWindows
If you're using the Unity engine, see the RequestNoticeData for Unity SDK.

Get Notice Data

Function Definition

UFUNCTION(BlueprintCallable, Category = "INTLSDKAPI")
static FString NoticeRequestData(
const FString Region,
const FString LangType,
const FString ExtraJson);

Input Parameters

ParametersTypeExplanation
RegionFStringISO 3166-1 numeric code for country or region
For example, 156 stands for China and 040 stands for Austria.
Passing 0 can retrieve announcements for all regions.
langTypeFStringLanguage type (RFC 4646), such as "en", used to define the language for sending emails and SMS
For more details, see Language Type Definition
ExtraJsonFStringExtended 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 kMethodIDNoticeRequestData.

Code example

UINTLSDKAPI::NoticeRequestData("0","zh-Hans","{}");

Notice custom tag configuration

note

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. If you need to use it, please contact the Player Network Assistant to enable the backend switch.

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

  1. Custom tags can be configured in the Player Network Console. For details, see Announcement Custom Attributes.

  2. After configuration, you can achieve precise matching by passing key-value pairs in the ExtraJson parameter of RequestNoticeData that 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"
UINTLSDKAPI::NoticeRequestData("0", "zh-Hans", "{\"custom_key\":\"custom_value\"}");