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
- Unity
- Unreal Engine
Supports
Android, iOS platform.Supports
Android, iOS platform.Function Definition
- Unity
- Unreal Engine
// Set account
void SetAccount(string channel, string account);
// Delete account
public static void DeleteAccount(string channel, string account);
// Set account
static void SetAccount(const std::string &channel, const std::string &account);
// Delete account
static void DeleteAccount(const std::string &channel, const std::string &account);
Input Parameters
- Unity
- Unreal Engine
| Parameters | Type | Description |
|---|---|---|
| channel | string | Proprietary terms of third-party channels such as "XG", "Firebase" |
| account | string | Set 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". |
| Parameters | Type | Description |
|---|---|---|
| channel | string | Proprietary terms of third-party channels such as "XG", "Firebase" |
| account | string | Set 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
- Unity
- Unreal Engine
// Set account
UnionAdapterAPI.GetPushService().SetAccount("XG", "msdk openid");
// Delete account
UnionAdapterAPI.GetPushService().DeleteAccount("XG", "msdk openid");
// Set account
GUA_NAMESPACE::GUAPushService::SetAccount("XG", "msdk openid");
// Delete account
GUA_NAMESPACE::GUAPushService::DeleteAccount("XG", "msdk openid");