Interface IModuleReporter


public interface IModuleReporter
Analogue of IReporter for custom modules and plugins. IModuleReporter can send events to an alternative api key, differ from api key, passed to AppMetrica.activate(Context, AppMetricaConfig) Instance of object can be obtained via ModulesFacade.getModuleReporter(Context, String) method call. For every api key only one IModuleReporter instance is created. You can either query it each time you need it, or save the reference by yourself.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    reportAdRevenue(AdRevenue adRevenue, boolean autoCollected)
    Reports auto collected adRevenue to AppMetrica
    void
    reportEvent(ModuleEvent moduleEvent)
    Sends report by event name.
    void
    setSessionExtra(String key, byte[] value)
    Sets session extra for current reporter.
  • Method Details

    • reportEvent

      void reportEvent(@NonNull ModuleEvent moduleEvent)
      Sends report by event name.
      Parameters:
      moduleEvent - Event parameters
    • setSessionExtra

      void setSessionExtra(@NonNull String key, @Nullable byte[] value)
      Sets session extra for current reporter. This data is stored on disk and used for every event even after application stop.
      Parameters:
      key - String key
      value - Value of extra
    • reportAdRevenue

      void reportAdRevenue(@NonNull AdRevenue adRevenue, boolean autoCollected)
      Reports auto collected adRevenue to AppMetrica
      Parameters:
      adRevenue - AdRevenue
      autoCollected - true if data is auto collected and false otherwise