SetTag/DeleteTag
AndroidiOS
If you were looking for the method for use with Unreal Engine, see SetTag/DeleteTag for Unreal Engine SDK.
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
Parameter | Type | Description |
---|---|---|
channel | string | The specified channel to push notifications. Example: "Firebase" |
tag | string | Tag 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_TAG
,INTL_PUSH_DELETE_TAG
.
Code sample
// Set tag
INTLAPI.SetTag(INTLChannel.Firebase, "INTL_TAG");
// Delete tag
INTLAPI.DeleteTag(INTLChannel.Firebase, "INTL_TAG");