-2

I wish to get a bit more detailed statistic about my app instead of standart google statistic. I was advised to use flury. However I dont see tutorial how to integrate it to my app or use it. Can any one explain or give a link to tutorials?

Yarh
  • 4,459
  • 5
  • 45
  • 95
  • Check the original Flurry API : http://support.flurry.com/index.php?title=Analytics/GettingStarted/TechnicalQuickStart/Android – hardartcore Jul 30 '13 at 08:09

2 Answers2

0

Flurry works with an ID to open a session an retrieve infos. I'm using it and it's quite simple to use.

1 - Head to flurry.com and register your app, which will generate a unique tracking code.

2 - Download and add the FlurryAgent jar to your project libraries. If you're using Eclipse, right-click your project folder, select properties, select Java Build Path, and choose Add External JARs...

3 - Add android.permission.INTERNET to your AndroidManifest.xml.

4 - Add a call to the Flurry agent from the onStart() and onStop() methods of your activities.

Note: replace the ID below with your unique tracking code.

public void onStart()
{
   super.onStart();
   FlurryAgent.onStartSession(this, "9GKQD4EBX123FEP6874H");
   // your code
}

public void onStop()
{
   super.onStop();
   FlurryAgent.onEndSession(this);
   // your code
}

See the answer here

Community
  • 1
  • 1
marshallino16
  • 2,645
  • 15
  • 29
  • i should add this code to each activity or only to application? – Yarh Jul 30 '13 at 08:13
  • No, I'm using my class application wich is the first class launch and it start a session, then I can call FlurryAgent on each activity I want. Thats the thing – marshallino16 Jul 30 '13 at 08:15
0

1st you need to download Flurry agent.jar and add this to your lib folder after that do the following in following methods

private void getFlurryEvents()
{
    HashMap<String, String> parameters = new HashMap<String, String>();
    parameters.put("Title of page", "Your page Title" );
    FlurryAgent.logEvent("View Page",parameters);
}

@Override
protected void onStart() {
    // TODO Auto-generated method stub
    super.onStart();
    FlurryAgent.onStartSession(this, Constants.FLURRY_API_KEY);
}

@Override
protected void onStop() {
    // TODO Auto-generated method stub
    super.onStop();
    //FlurryAgent.onEndSession(this);
}

in onstart method strt the Session and in on stop stop the session and in oncreate add the method getFlurry agent

and get your API key from flurry

Usman Kurd
  • 7,212
  • 7
  • 57
  • 86