How to use flurry in an application?

依然范特西╮ 提交于 2019-11-26 18:18:43

问题


I would like to use flurry and its features in my application. How can i register myself with flurry and how can i use it in my android application?

Thanks


回答1:


It's actually really simple.

1 - Head to flurry.com and register for 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.. or use Gradle + Jcenter compile 'com.flurry.android:analytics:6.2.0'

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
}

That's it!




回答2:


You can use the following methods (during a session only) to report additional data:

FlurryAgent.logEvent(String eventId)
FlurryAgent.logEvent(String eventId, boolean timed)
FlurryAgent.logEvent(String eventId, Map<String, String> parameters)
FlurryAgent.logEvent(String eventId, Map<String, String> parameters, boolean timed)



回答3:


Steps by steps use Flurry Analytics.

http://support.flurry.com/index.php?title=Analytics/GettingStarted/TechnicalQuickStart/Android



来源:https://stackoverflow.com/questions/4460566/how-to-use-flurry-in-an-application

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!