addUserContextUpdateListener

Adds a listener that will be invoked when the user's current context is updated. The user context updates delivered by this listener will not be filtered according to any (user context) criteria, and will not include any provisional events. See isProvisional to learn more about what a provisional event is.

If the listener instance provided has been previously added, then it will be replaced. The user context criteria of interest will also be replaced.

Calling this function has the same effect as calling addUserContextUpdateListener(false, listener). Use addProvisionalAwareUserContextUpdateListener instead if you wish the updates to include provisional events.

Parameters

listener

The listener to be invoked when the user's current context is updated.

Throws

if the SDK is not initialized.


Adds a listener that will be invoked when the user's current context is updated. You can filter the context criteria you are interested in.

The user context updates delivered by this listener will not include any provisional events. See isProvisional to learn more about what a provisional event is.

If the listener instance provided has been previously added, then it will be replaced. The user context criteria of interest will also be replaced.

Calling this function has the same effect as calling addUserContextUpdateListener(false, criteria, listener). Use addProvisionalAwareUserContextUpdateListenerWithCriteria instead if you wish the updates to include provisional events.

Parameters

criteria

The user context criteria you're interested in.

listener

The listener to be invoked when the user's current context is updated.

Throws

if the SDK is not initialized.