Menu

Preset Event Custom Properties

Install

Automatically report the event upon the first opening after install.

The  _event_name of install event is _appInstall.

AppStart

Automatically report the event when the Android app restarts (after being inactive for more than 30 seconds since the last exit) or when it is brought back to the foreground after being in the background for 30 seconds.

The  _event_name of appstart  is _appStart.

AppEnd

Automatically report the event when Android app is exited or sent to the background for more than 30 seconds.

The _event_name of append is _appEnd.

Add Custom Preset Event Properties

       SolarEngine SDK supports developers to set custom properties for three preset events: appStart, appInstall, and appEnd:

public static void setPresetEvent(PresetEventType eventType, Dictionary<string, object> properties)
ParameterDescriptionTypeRequired
eventTypePreset events, e.g.
AppInstall
AppStart
AppEnd
All
PresetEventTypeYes
propertiesCustom preset event properties sent by the developerDictionaryNo

Sample Code

Dictionary<string, object> properties = new Dictionary<string, object>();
properties.Add("K1", "V1");
properties.Add("K2", "V2");
properties.Add("K3", 2);
SolarEngine.Analytics.setPresetEvent(PresetEventType.all, properties);

// After calling setPresetEvent API, _appInstall, _appStart and _appEnd events will all bring the custom properties under "properties".

Note:

  1. Custom properties should be set before events are triggered, and properties for appInstall event should be added before SDK initialization.
  2. Only the last setting will take effect if multiple properties are made for the same preset event.
  3. PresetEventType.all will apply to appInstall, appStart and appEnd at the same time.
  4. Clear certain custom properties for preset events
SolarEngineManager.getInstance().setPresetEvent(PresetEventType.Start,null)

5.  Custom properties cannot start with an underscore "_". The SE SDK will abandon properties like this.


Previous
Event Reporting
Next
Predefined Events
Last modified: 2025-01-07Powered by