Alex Rivera | Logout

Use FlurryAgent.onEvent(String eventId, Map<String, String> parameters)

Asked 2010-06-10T10:29:07.517
12

Please anybody tell how to use

FlurryAgent.onEvent(String eventId, Map<String, String> parameters)

in an android activity to track events with flurry ?

Edit
Report

1 Answer

6

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<String, String> parameters = new HashMap<String, String>();
            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!

answered 2011-10-25T20:34:54.513

Your Answer