Skip to main content

Set/Delete Account (SetAccount/DeleteAccount) [MSDK only]

info

Currently, only the XG channel supports setting and logging out accounts; the Firebase channel does not.

[MSDK only] Set different accounts for different users. When sending push notifications, you can target notifications based on the set account.

Supported Platforms

Supports Android, iOS platform.

Function Definition

// Set account
void SetAccount(string channel, string account);

// Delete account
public static void DeleteAccount(string channel, string account);

Input Parameters

ParametersTypeDescription
channelstringProprietary terms of third-party channels
such as "XG", "Firebase"
accountstringSet account
After setting an account, you can send push notifications specific to that account. The account cannot be a single character such as "2" or "a".

Code Example

// Set account
UnionAdapterAPI.GetPushService().SetAccount("XG", "msdk openid");

// Delete account
UnionAdapterAPI.GetPushService().DeleteAccount("XG", "msdk openid");