Please anybody tell how to use
FlurryAgent.onEvent(String eventId, Map parameters)
in an android activity to track events
I show you a simple example. In this code i want to log simple events and other events with a category.
public void logAnalyticsEvent(final String versionName, final String strMsg, final String category){
if (category==null){
FlurryAgent.logEvent(strMsg);
}else{
final HashMap parameters = new HashMap();
parameters.put("Event",strMsg );
FlurryAgent.logEvent(category, parameters);
}
}
in the first part of the condition i'm logging the only the event, in the second part I put the name of the event inside de parameters (a hashmap with a key named "Event" and value the name of the event) and I log the name of the category with the parameters (events inside)
FlurryAgent.logEvent(category, parameters);
Hope this helps!