yuval
yuval

Reputation: 6428

How to use Optimizely.dispatchEvents() method from Optimizely Android SDK

The quickstart guide for the Optimizely Android SDK includes the following example:

private void userClickedImportantButton() {
      Optimizely.trackEvent("ImportantButtonClicked");
      Optimizely.dispatchEvents(); // Manually send the event logs back to the server
  }

This can be found here

However, the example is incorrect and doesn't actually work - it appears that dispatchEvents() is an instance method, not static method, of the Optimizely class.

What is the correct way to use it?

Upvotes: 1

Views: 75

Answers (1)

yuval
yuval

Reputation: 6428

The Optimizely folks answered my question on their community forum post:

https://community.optimizely.com/t5/Mobile-Apps/Android-how-to-use-Optimizely-dispatchEvents/m-p/10907#M121

The answer is that dispatchEvents() is deprecated and you should use sendEvents() instead.

Upvotes: 0

Related Questions