Skip to main content

SetTag/DeleteTag

AndroidiOS
If you were looking for the method for use with Unreal Engine, see SetTag/DeleteTag for Unreal Engine SDK.

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.

Function definition

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

// Delete 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.

Observers

The callback processing interface is PushBaseResultObserver. The callback data structure is BaseResult.

The callback methodID is INTL_PUSH_SET_TAGINTL_PUSH_DELETE_TAG.

Code sample

// Set tag
INTLAPI.SetTag(INTLChannel.Firebase, "INTL_TAG");

// Delete tag
INTLAPI.DeleteTag(INTLChannel.Firebase, "INTL_TAG");