To optimize battery usage, events for Windows are divided into pending and immediate events.

To optimize sending events, all available metrics are sent to the database whenever it is connected to the APIs.

Pending events are events with a low priority that can be queued and sent later. These events are added to the database and only sent in the following scenarios:

  • When there is a new launch of the application, and the sending process starts from the OnLaunched method.
  • When an immediate event is sent.

A session tracking event is a type of pending event. For session tracking, a user session is tracked, and a session ended event (sessionEnded) is sent.

Immediate events are events with high priority that must be sent immediately. When an event is added and stored in the database, an attempt to send it, along with other pending events in the database, starts right away.

A session tracking event is a type of immediate event. For session tracking, a user session is tracked and a session started event (sessionStarted) is sent.

Creating events

You can create events by using the following code:

var apiEvent = new IBMMobilePush.Events.Event("name", "type"); 

Use the following code with the manager interface:

IBMMobilePush.Events.EventManager.Instance.SendEvent(apiEvent, true);

Use the following code with the direct client:

IBMMobilePush.Events.EventClient.SendEvent(apiEvent);

Go Back to the Mobile App Messaging home page.

Join The Discussion

Your email address will not be published. Required fields are marked *