public class EventApi
extends java.lang.Object
This class provides static methods allowing any app to record events in the Agora repository which will be automatically migrated to the device manager and on to the aggregation servers for analysis.
Each event has an event type, an arbitrary String. Each event records the package which registers it, and the date and time of registration. Finally apps can add arbitrary data to an event as
Constructor and Description |
---|
EventApi() |
Modifier and Type | Method and Description |
---|---|
static void |
registerEvent(android.content.Context context,
java.lang.String type)
Registers an event.
|
static void |
registerEvent(android.content.Context context,
java.lang.String type,
java.util.Map<java.lang.String,java.lang.String> data)
Registers an event.
|
static void |
registerEvent(android.content.Context context,
java.lang.String type,
java.lang.Object data)
Registers an event.
|
static void |
registerEvent(android.content.Context context,
java.lang.String type,
java.lang.String... data)
Registers an event.
|
public static void registerEvent(android.content.Context context, java.lang.String type, java.util.Map<java.lang.String,java.lang.String> data)
context
- an Android context (such as an Activity or Service)type
- an arbitrary String indicating the type of the eventdata
- key-value pairs to be stored as data with the eventpublic static void registerEvent(android.content.Context context, java.lang.String type, java.lang.String... data)
context
- an Android context (such as an Activity or Service)type
- an arbitrary String indicating the type of the eventdata
- key-value pairs (alternating key, value) to be stored as data with the eventpublic static void registerEvent(android.content.Context context, java.lang.String type)
context
- an Android context (such as an Activity or Service)type
- an arbitrary String indicating the type of the eventpublic static void registerEvent(android.content.Context context, java.lang.String type, java.lang.Object data)
context
- an Android context (such as an Activity or Service)type
- an arbitrary String indicating the type of the eventdata
- a piece of arbitrary data to be stored with the event. It is converted to a String and stored under the key "data".