Menu

Set Account ID

       If there is a login system within your app, the "login" method should be called to set account ID for users who actually log in. Once set successfully, events triggered after this will be attached the account ID. When users log out, the "logout" method should be called to clear the account ID and events triggered later will not have the account ID anymore.

Note:

       Once the account ID is set, it will be retained until the "logout" method is called to clear the account ID.

1. Set Account ID

Function

public void login(String accountID);
ParameterDescriptionTypeRequired
accountIDAccount ID to be setStringYes

Sample Code

import com.reyun.solar.engine.SolarEngineManager;
SolarEngineManager.getInstance().login("xxxAccountIDxxx");

Note:

1.This call only passes account IDs to the SDK and does not report user login events.

2.The length of the account ID cannot exceed 128 characters, otherwise it will fail to be set.

2. Get Account ID

Function

public String getAccountID();

   Return the set account ID. (Default "")

Sample Code

import com.reyun.solar.engine.SolarEngineManager;
String getAccountID = SolarEngineManager.getInstance().getAccountID("xxxAccountIDxxx");

3. Clear Account ID

       Call logout to clear the account ID.

Function

public void logout();

Sample Code

import com.reyun.solar.engine.SolarEngineManager;
SolarEngineManager.getInstance().logout();

Note:

       This call only notifies the SDK to clear the account ID and will not report the user logout event.

Previous
Set Visitor ID
Next
Set Public Event Properties
Last modified: 2024-12-03Powered by