Skip to main content

SetTag/DeleteTag

[Player Network SDK & MSDK] Games can set different tags for users, such as gender, age, education background, hobbies, and so on. Player Network SDK provides a set of default tags for games to push specified notifications to the target audience.

Sending tagged notifications is the same as sending regular notifications. Games only need to select a tag to send the push notifications to the tagged audience.

caution

Tag format: Tags cannot contain space.

Supported Platform

Supports Android, iOS platform.

Function Definition

// Set tag
void SetTag(string channel, string tag);

// Delet tag
public static void DeleteTag(string channel, string tag);

Input Parameters

ParameterTypeDescription
channelstringThe specified channel to push notifications.
Example: "Firebase""
tagstringTag
Cannot be null or contain spaces.

Callback Processing

The callback processing API is GUAPushBaseResultObserver. The callback data structure is GUABaseResult.

The callback event is PushBaseResultEvents. The callback methodID is GUA_PUSH_SET_TAGGUA_PUSH_DELETE_TAG.

Code Sample

// Set tag
UnionAdapterAPI.GetPushService().SetTag("Firebase", "tag");

// Delet tag
UnionAdapterAPI.GetPushService().DeleteTag("Firebase", "Tag");