Rich-text Reply

Android - how to use Optimizely.dispatchEvents()

yuval 05-21-15
Accepted Solution

Android - how to use Optimizely.dispatchEvents()

The quickstart guide for the 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: here)

 

However, this example is inaccurate 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?

Level 2

Re: Android - how to use Optimizely.dispatchEvents()

Hi there!
Thank you so much for the bug report! I'm sorry our documentation is out of date. I've already updated it and you should see a corrected version live on developers.optimizely.com
The API was renamed to `sendEvents()`

If you have any further issues, please don't hesitate to reach out!
Optimizely