我正在为 facebook 示例演示应用程序开发 xmpp 聊天。我的 ApplicationActivity 扩展了 Application。为此,我遵循此 url https://github.com/ACRA/acra/wiki/BasicSetup.In在本教程中,我看到了@ReportsCrashes(formKey="", logcatArguments={},formUri="",....etc) 那是什么 formkey、logcatArguments、formUri...等等 我如何获得 formkey 和 logcatArguments 以及 formUri 和我从哪里得到...
我不知道 ReportsCrashes 和 org.acra 我是新手。
任何人请帮助我..感谢功能..
最佳答案
这取决于您要将报告发送到哪里。当您使用 Google Docs ( might be deprecated now ) 时,您必须使用从 google docs 文档中获得的 formKey。如果您想将报告存储在您自己的服务器上,您可以将 formKey 字段留空。您唯一需要做的就是为您的服务器输入一个有效的 URL (formUri = ....)。
其他字符串用于对话框的类型,应该出现或不应该出现。看看 advanced usage .在状态栏、警报对话框或 toasts 中有一些有用的通知示例。
例如toast 通知:
@ReportsCrashes(formUri = "http://www.backendofyourchoice.com/reportpath",
mode = ReportingInteractionMode.TOAST,
forceCloseDialogAfterToast = false, // optional, default false
resToastText = R.string.crash_toast_text)
您可以使用 BugSense,而不是使用您自己的服务器。参见 this stackoverflow 上的线程。
我复制了重要的帖子:
As the use of
Google Docs
is deprecated forACRA
I recommend you to useBugSense
as your Back-End service:1. Go to their site and sign in: http://www.bugsense.com/
2. Create a new project to monitor in
BugSense
site, as a result you will receive anAPI Key
for this application.3. Finally add this line to you Application class in you project:
@ReportsCrashes(formUri = "http://www.bugsense.com/api/acra?api_key=YOUR_API_KEY", formKey="")
关于android - 什么是 formkey 以及如何获取 formkey?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16731141/