Public event properties refer to the properties that are included in every event, such as the user's source channel and the advertising ID associated with conversions.
It is recommended to set the public event properties before the SDK initialization. This ensures that the predefined public event properties are included in all reported events.
The method for setting public event properties supports various data types, including int, long, float, double, boolean, string, as well as JSONArray and JSONObject. Here's an example of setting a value of type String.
Function
public void setSuperProperties(Context context, String key, String value);
Parameter | Description | Type | Required |
---|---|---|---|
context | The context of the application | Context | Yes |
key | The "key" of the public event property | String | Yes |
value | The "value" of the public event property | String | Yes |
Sample Code
import com.reyun.solar.engine.SolarEngineManager;
SolarEngineManager.getInstance().setSuperProperties(context,"key","value");
Note:
Function
public void unsetSuperProperty(Context context,String key);
Parameter | Description | Type | Required |
---|---|---|---|
context | The context of the application | Context | Yes |
key | The "key" of the public event property | String | Yes |
Sample Code
import com.reyun.solar.engine.SolarEngineManager;
SolarEngineManager.getInstance().unsetSuperProperty(context,"xxxkey value needs clearingxxx");
Function
public void clearSuperProperties(Context context);
Parameter | Description | Type | Required |
---|---|---|---|
context | The context of the application | Context | Yes |
Sample Code
import com.reyun.solar.engine.SolarEngineManager;
SolarEngineManager.getInstance().clearSuperProperties(context);