Package io.appmetrica.analytics
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 TypeMethodDescriptionvoid
reportAdRevenue
(AdRevenue adRevenue, boolean autoCollected) Reports auto collected adRevenue to AppMetricavoid
reportEvent
(ModuleEvent moduleEvent) Sends report by event name.void
setSessionExtra
(String key, byte[] value) Sets session extra for current reporter.
-
Method Details
-
reportEvent
Sends report by event name.- Parameters:
moduleEvent
- Event parameters
-
setSessionExtra
Sets session extra for current reporter. This data is stored on disk and used for every event even after application stop.- Parameters:
key
-String
keyvalue
- Value of extra
-
reportAdRevenue
Reports auto collected adRevenue to AppMetrica- Parameters:
adRevenue
- AdRevenueautoCollected
- true if data is auto collected and false otherwise
-