You can create events that are sent to a queue and to the server immediately, or to the queue and to the server later. You can also create event callbacks.
Note: The addEvent API is deprecated. You can use the queueAddEvent API as a replacement.
• To send a new event to a queue and to the server immediately, use the following code:
SDK.Instance.QueueAddEvent("appOpened", "simpleNotification", DateTimeOffset.Now, "attribution", new Dictionary(), true);
• To send a new event to a queue and to the server later, use the following code:
SDK.Instance.QueueAddEvent("appOpened", "simpleNotification", DateTimeOffset.Now, "attribution", new Dictionary(), false);
• To send queued events to the server, use the following code:
SDK.Instance.FlushEventQueue();
Note: On failure, the event queue retries sending the event to the server.
• To add event queue callbacks, use the following Add QueueCallback function delegate code:
SDK.Instance.EventQueueResults += QueueCallback;
• To remove event queue callbacks, use the following Remove QueueCallback function delegate code:
SDK.Instance.EventQueueResults -= QueueCallback;
Go Back to the Mobile App Messaging home page.