如何在Android程序中使用ACRA3(How to install ACRA3 in your Android application)
来源:互联网 发布:中国移动 网络强国 编辑:程序博客网 时间:2024/06/05 15:45
一、介绍(Introduction)
ACRA 允许你的Android应用将崩溃报告以谷歌文档电子表的形式进行发送。本教程将引导您在应用程序项目中安装ACRA。
ACRA allows your Android application to send Crash Reports in a Google Docs spreadsheet. This tutorial will guide you in installing ACRA in your application project.
建议 :可以在谷歌文档电子表格的preferences页面,设置通知规则,那么当有报告发送的时候,就会受到邮件通知了! 三、高级用法(Advanced Usage) 默认情况,ACRA仅仅是将崩溃报告发送到服务端。从使用应用的用户来看,应用崩溃的时候仅仅是"Force Close"对话框是不够的。 作为开发者,你可能更喜欢通知用户崩溃报告已经发送了...... 为什么不允许他描述一下崩溃之时他正在所操作的动作呢? ACRA 提供了这些选项,并且允许定制崩溃报告通知。 有两种通知模式: 二、设置好你的项目(Setting-up your project)
按照以下步骤在现有的应用程序项目中安装ACRA库:
Step by step installation of the ACRA library in an existing application project:
在 MyApplication 类中, 覆盖 onCreate() 方法并添加ACRA初始化代码
打开android配置文件AndroidManifest.xml
用户通知
- display a status bar notification, then offering the user a dialog asking him to send the report or not, with an optional comment field you can chose to add or not.
Enabling user notification only requires you to add parameters to the @ReportsCrashes annotation :
- Toast notification:
@ReportsCrashes(formKey="dGVacG0ydVHnaNHjRjVTUTEtb3FPWGc6MQ",
mode = ReportingInteractionMode.TOAST,
resToastText = R.string.crash_toast_text)
public class MyApplication extends Application {
...
在 strings.xml 中
状态栏通知:
在 strings.xml 中:
In your AndroidManifest.xml
详细内容请访问:http://code.google.com/p/acra/wiki/ACRA3HowTo
- 如何在Android程序中使用ACRA3(How to install ACRA3 in your Android application)
- 如何在Android程序中使用ACRA3(How to install ACRA3 in your Android application)
- Android ACRA3介绍
- ACRA3介绍
- How to Install Android on Your PC
- 在iPhone应用中如何使用随机数(How to Use Random Numbers in Your iPhone App)
- How to Install Android in VirtualBox
- Saving data to a file in your Android application
- How to: subversion build number in your Android app
- Android:How to use loader in Android(如何使用Loader)
- How to install an APK file in the Android emulator?
- How to discover memory usage of my application in Android
- How to discover memory usage of my application in Android
- How to discover memory usage of my application in Android
- How to include *.so file in Android-gradle application?
- How to discover memory usage of my application in Android
- how to install your kernel code in FC6
- How to use AspnetUpload™ in your web application
- error和exception的区别,RuntimeException和非RuntimeException的区别
- Ubuntu系统中mplayer查找rmvb视频解码器的过程解析
- 18个经典培训故事
- 如何在Windows下用WAMP安装magento
- 多服务器共享session的方法
- 如何在Android程序中使用ACRA3(How to install ACRA3 in your Android application)
- C++开源跨平台类库 收藏
- Linux下的虚拟光驱和虚拟软驱
- 这家伙很懒,什么都米留下!
- ssh2整合OA问题集
- 学习delphi过程中收集的一些功能代码(整理中)
- 如何通过Java反射访问类里面的私有方法和变量
- 人生,理想,无趣
- 无法读取配置节“system.web.extensions”,因为它缺少节声明