Skip to main content

Android Events

You can pass existing or new events to the OpenBack SDK client side, to signal and deliver a message. An event is an action at a particular moment in time for each user, which can then be used to deliver a notification. You can easily pass existing or new events to the OpenBack SDK client-side, making advanced campaigns simple.

To use an event, it must first be created in your App Settings with a unique tag - for example UserSignupComplete, LevelUp, PaymentDetailsIncomplete etc. The Custom Events are on the App Setup tab and within the Advanced Setup section.

Custom Segments

Then tag the same event within your app using the code from the signalEvent section.

Signal an event

When signalling an event, you can also add a delay (in seconds) which will delay the delivery of the notification. This delay can either be set in the dashboard while creating your message or it can be set client-side within your app.

To use the delay set in the dashboard, you must set the delay to a negative value within your app client-side.

OpenBack.signalEvent("YourEvent", -1);

For example - to create an event that will send a message when a user has their energy restored. If a user runs out of energy and you know it takes 10 minutes for that energy to restore, do the following:

Create an event called EnergyEmptyin the Events Settings section of your App Settings and then in your code put

OpenBack.signalEvent("EnergyEmpty", 600);

Cancel an event

Suppose a user opens the application and the energy is refilled, you can cancel the previous event using the following:


It will remove scheduled and active message notifications for all messages that use the given event.


If you already have a class for tracking events, you can also call OpenBack at the same time.