1

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?

yuval
  • 6,369
  • 3
  • 32
  • 44

1 Answers1

0

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.

yuval
  • 6,369
  • 3
  • 32
  • 44