Menu

Preset Events

Install

Automatically report the event upon the first opening after installation.

The  _event_name of install event is _appInstall.

AppStart

Automatically report the event when the Android application 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 application is exited or sent to the background for more than 30 seconds.

The _event_name of append is _appEnd.

Set custom properties for preset events

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

Function

export function setPreSetEventWithProperties(eventType:PresetEventType, properties:Object);
Parameter DescriptionTypeRequired
eventTypePreset events, e.g.
INSTALL (AppInstall)
START (AppStart)
END (AppEnd)
PresetEventTypeYes
propertiesCustom preset event properties sent by the developerObjectNo

Sample Code

let eventType:PresetEventType = PresetEventType.START|PresetEventType.INSTALL;
let properties = { ... };
SolarEngine.setPreSetEventWithProperties(eventType,properties);
// After calling setPresetEvent API, _appInstall、_appStart and _appEnd events will all bring the custom properties under "properties"..

Note:

  • Preset event properties should be set before SDK initialization. In this way, the properties will apply to all subsequent preset events reported by the SDK. If set after SDK initialization, the preset events generated before setting will not include these custom properties.
  • Custom preset event properties are not cached. Only the last setting will take effect if multiple settings are made for the same preset event.
  • Please do not customize properties with a key starting with an underscore "_". The SE SDK will abandon properties like this.
  • Preset event properties can be cleared by calling the corresponding enumeration with nil as the property value. For example:
let eventType:PresetEventType = PresetEventType.START|PresetEventType.INSTALL|PresetEventType.END
let properties = {};
SolarEngine.setPreSetEventWithProperties(eventType,properties);


Previous
Event Reporting
Next
Predefined Events
Last modified: 2024-12-05Powered by