Package 

Interface DebugAnalyticsProvider

  • All Implemented Interfaces:
    com.shalan.analytics.core.AnalyticsProvider

    
    public interface DebugAnalyticsProvider
     implements AnalyticsProvider
                        

    An extended AnalyticsProvider interface specifically for debugging purposes. Implementations of this interface can provide additional functionalities like retrieving logged events or enabling/disabling mock modes.

    • Method Summary

      Modifier and Type Method Description
      abstract List<AnalyticsEvent> getLoggedEvents() Retrieves a list of all events that have been logged by this provider.
      abstract Unit clearLoggedEvents() Clears all previously logged events from this provider's internal storage.
      abstract Unit setMockMode(Boolean enabled) Sets the mock mode for this provider.
      • Methods inherited from class com.shalan.analytics.core.DebugAnalyticsProvider

        logEvent, setUserId, setUserProperty
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getLoggedEvents

         abstract List<AnalyticsEvent> getLoggedEvents()

        Retrieves a list of all events that have been logged by this provider. This is useful for verifying analytics calls during development and testing.

      • clearLoggedEvents

         abstract Unit clearLoggedEvents()

        Clears all previously logged events from this provider's internal storage. This is useful for resetting the state between tests or debugging sessions.

      • setMockMode

         abstract Unit setMockMode(Boolean enabled)

        Sets the mock mode for this provider. When mock mode is enabled, the provider might simulate analytics calls without actually sending data to a backend, or it might alter its behavior for testing.

        Parameters:
        enabled - true to enable mock mode, false to disable it.