Skip to main content

Announcement

The Player Network Announcement service offers an easy-to-use interface for games to display various in-game announcements, including version updates and game events. With customizable templates and a rich text editor, crafting notifications becomes a simple task.

Prerequisites

note

Before integrating the Announcement service module, reach out to the Player Network representative.

  1. Integrate the Player Network SDK

    This allows them to fetch notifications configured on the Player Network Console. It's the responsibility of game developers and operation teams to decide how to parse and display these notifications. As the notifications are sent in code to the client, they need to be parsed by the frontend developer.

  2. Establish the UI design and configuration processes for announcements on the Player Network Console.

Process requests for announcement data

Developers can register the following callback functions to receive notifications regarding announcement events. This allows developers to detect and process the requests for announcement data.

APIFunction
AddNoticeResultObserverRegisters the NoticeResult callback of the Player Network SDK Announcement module. Use it to manage RequestNoticeData API callback.
RemoveNoticeResultObserverUnregisters NoticeResult callback.

Request for announcement data

Call the RequestNoticeData function with the following parameters to retrieve the announcement data configured on the Player Network Console and display them in the game:

  • An integer representing the ISO 3166-1 code of the region, with 0 standing for all regions.
  • A string representing the RFC 4646 language code of the announcement content.
  • An optional string to filter announcement content.
string seqid = INTLAPI.RequestNoticeData("0", "zh-Hans", extraJson);