1)、Add the FlurryAnalytics_5.6.0.jar file to your classpath.
2)、Configure AndroidManifest.xml

    a). android.permission.INTERNETRequired to send analytics data back to the flurry serversb). android.permission.ACCESS_NETWORK_STATEIf your application has network state permissions, transmission of analytics data can be optimized.c). android.permission.ACCESS_COARSE_LOCATION orandroid.permission.ACCESS_FINE_LOCATION

3)、Add calls to init, onStartSession and onEndSession

1、  If you are shipping an app, Insert a call to FlurryAgent.init(Context, String) in your class, passing it a reference to your Application Context and your project's API key:
public class MyApplication extends Application {@Overridepublic void onCreate() {super.onCreate();// configure FlurryFlurryAgent.setLogEnabled(false);// init FlurryFlurryAgent.init(this, MY_FLURRY_APIKEY);}
}
    2、  If you are writing an app and the minimum target is Ice Cream Sandwich or above (minSdkVersion is set to API level 14 or greater), session handling is completely automatic and you may skip steps 3 and 4. If you are instrumenting another type of Context, such as a Service, or your minimum target is Gingerbread, proceed with steps 3 or 4.3、Insert a call to FlurryAgent.onStartSession(Context), passing it a reference to a Context object (such as an Activity or Service). If you are targeting Gingerbread, we recommend using the onStart method of each Activity in your application, and passing the Activity itself as the Context object. For services (or other Contexts), use the Service or the relevant Context as the Context object. Do not pass in the global Application context.4、Insert a call to FlurryAgent.onEndSession(Context) when a session is complete. If you are targeting Gingerbread, we recommend using the onStop method of each Activity in your application. For services (or other Contexts), ensure that onStop is called in each instrumented Service. Make sure to match up a call to onEndSession for each call of onStartSession, passing in the same  Context object that was used to call onStartSession. Do not pass in the global Application context.

You’re done! That’s all you need to do to begin receiving basic metric data.

3)、Optional Features

    **Report Additional Data**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)

Use FlurryAgent.logEvent to track user events that happen during a session. You can track how many times each event occurs, what order events happen in, how long events are, as well as what the most common parameters are for each event. This can be useful for measuring how often users take various actions, or what sequences of actions they usually perform. Each project supports a maximum of 300 event names, and each event id, parameter key, and parameter value must be no more than 255 characters in length. Each event can have no more than 10 parameters. The parameter argument is optional, and may be null. Each session can log up to 200 events and up to 100 unique event names.

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

Timed event can be logged using FlurryAgent.logEvent. Use endTimedEvent to end the timed event.

4)、备注
以上就完成了 Fulrry 的配置过程,在项目中的代码是长这样的。
启动关闭代码

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

简单的可以在你的Activity的onStart()和onStop()方法中添加如上代码。
按照以上步骤就可以开始最基础的flurry测试了。运行完程序后一般需等待一定时间(目前来看只有前一天的数据)来在网页上看到数据的更新。
另外Flurry还可以记录你的一些事件信息。使用的函数如下:

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

eventId是自己随便定义的。就是相当于为你追踪的这个事件取个名字。
特别的,如果需要检测具体事件的响应时间(比如某个按钮事件),需要注意logEvent (String eventId, boolean timed),将timed参数设为true就可以记录这个event的开始执行时间,然后在你的代码中你认为事件完成的地方再调用endTimedEvent (String eventId)。这样会记录事件的整个执行时间。不过需要注意,经过我到目前的研究,不管是通过查看Analytics的分析页面,还是通过API直接获取数据。都得不到单个事件每一次执行的时间。只能得到平均(average),总体(total)。就是你这个事件执行了N次,它算N次的平均执行时间和N次相加的全部执行时间。
参考代码:

    case R.id.calllog_settings:  FlurryAgent.logEvent("calllog_settings", true);                      SettingsLauncher.launch(this);  FlurryAgent.endTimedEvent("calllog_settings");  return true;  

Android API Document:

http://support.flurry.com/index.php?title=Analytics/Code/Doc/Android

FLURRY 文档摘要及备注相关推荐

  1. 复旦大学张奇组:对话摘要数据不足?对话数据、文档摘要数据,我全都要!...

    ©PaperWeekly 原创 · 作者 | 刘兴贤 学校 | 北京邮电大学硕士生 研究方向 | 自然语言处理 这篇文章发表在 EMNLP 2021,是复旦大学张奇老师组的工作.本文尝试解决的问题是对 ...

  2. 论文阅读|基于领域知识图谱的多文档摘要生成与应用

    论文地址:基于领域知识图谱的多文档摘要生成与应用 先验知识 1.多文档摘要技术: (理解:类似于每篇文章的摘要.关键词,方便通过标签筛选是否是你需要的内容) 利用计算机将同一主题下或者不同主题下的多篇 ...

  3. mysql文档摘要续4

    mysql function and operate mysql在针对string类型使用int的索引情况,如select * from table where tbl_name=1;在tbl_nam ...

  4. 如何操作 Office Open XML 格式文档

    摘要: Office Open XML格式文件代替了早期的二进制Office系统文件.本文档向您介绍了包含在一个格式化文档中的组件以及展示这些文件功能的一些场景 . Frank Rice,微软公司 适 ...

  5. Java 实现数据库数据 导入 导出成Excel文档的功能

    1.创建导入 导出工具类,写入其导入和导出方法 导出成外部文件: public static ResponseEntity<byte[]> emp2Excel(List<Emp> ...

  6. 如何操作 Office Open XML 格式文档(转)

    原文地址为: 如何操作 Office Open XML 格式文档(转) 摘要: Office Open XML格式文件代替了早期的二进制Office系统文件.本文档向您介绍了包含在一个格式化文档中的组 ...

  7. 多可文档管理服务器,【多可文档管理系统怎么用】多可文档管理系统好不好_使用技巧-ZOL软件百科...

    1.丰富的传输方式 1)多可文档管理系统提供批量文档传输工具,可以一次批量导入文件,也可定时导入文件. 2)系统提供快速导入功能,可以在服务器端选择服务器路径快速导入超大批量文件,文档大规模导入. 3 ...

  8. 用asp怎样编写文档搜索页面

    <html><head><title>Microsoft Index Server: 查询语言</title> <SCRIPT LANGUAGE= ...

  9. Spring Boot 使用 Swagger3 生成 API 接口文档

    前言 在之前的文章中,我们已经讲了如何利用 Spring Boot 来集成 Swagger2,详情可戳:Spring Boot 集成 Swagger2,构建强大的 API 文档.但其实 Swagger ...

  10. OFD文档标准 2.主入口文档

    2.主入口文档 OFD根元素 DocInfo与CT_DocInfo Versions和Version OFD.xml文档示例 国标的<电子文件存储与交换格式 版式文档>中将XML语言中的属 ...

最新文章

  1. mysql 去重取出最小值_5000字总结MySQL单表查询,新手看这一篇足够了!
  2. Linux 高可用开源方案 Keepalived VS Heartbeat对比
  3. 1、MySQL为什么需要事务?
  4. axis2 java.net.url_axis,axis2调用.net的webservice
  5. 网站图片全自动加密_11 个值得收藏的在线工具和资源网站
  6. spring boot 1.4默认使用 hibernate validator
  7. python单步调试的方法_python断点调试方法
  8. 【VB.NET】VB.NET字符串数组排序
  9. 自学python买什么教材-从自学到编写大学python教材——低调quot;虫师”谢乾坤
  10. 【重点!DP】LeetCode 97. Interleaving String
  11. 【Nginx】Nginx学习笔记01_linux/centos下安装Nginx
  12. 关于background与background-image用法
  13. 初级算法代码-位移密码
  14. OSChina 周二乱弹 ——普通高等男友招生考试
  15. 【如何解决 Web 越来越繁杂的问题】笔记
  16. 自定义对象转换接口实现JDBC的封装
  17. postgres使用with计算占比,同比和环比
  18. 工程项目管理系统-----装修装饰行业的管理软件
  19. linux设备驱动--字符设备模型
  20. python计算器程序_python练习 计算器模拟程序

热门文章

  1. txt文件编辑器(v5.0)
  2. c语言如何编程出声音,C语言播放声音最简单的两种方法
  3. 每天学一个 Linux 命令(115):accton
  4. Unix环境高级编程—进程控制(三)
  5. 分蛋糕、思路视频(动态规划)
  6. Fractions to Decimals_usaco2.4.5_暴力
  7. zabbix基础·配置短信报警
  8. 用python画钢铁侠_秒变钢铁侠,这个暑假,用 Python 让自己成为超级英雄!
  9. 数据库学习笔记(进阶)
  10. 计算机装系统找不到硬盘,电脑重装系统找不到硬盘驱动器怎么办?