[英]Sending email with ACRA on Android
I am trying to send a crash report from an android application and it is opening a email client and entering com.xx Crash Report in the email body.我正在尝试从 android 应用程序发送崩溃报告,它正在打开电子邮件客户端并在电子邮件正文中输入com.xx 崩溃报告。 I cant seem to be able to get any other information in the email.我似乎无法在电子邮件中获得任何其他信息。 The docs dont have a complete email example and i have reportContent
added (but APP_VERSION is not resolving).文档没有完整的电子邮件示例,我添加了reportContent
(但 APP_VERSION 未解析)。 I have also updated my manifest file with READ_PHONE_STATE我还用READ_PHONE_STATE更新了我的清单文件
I'm referencing this https://github.com/ACRA/acra/wiki/AdvancedUsage#choosing-which-fields-to-be-included-in-reports .我正在参考这个https://github.com/ACRA/acra/wiki/AdvancedUsage#choosing-which-fields-to-be-included-in-reports 。
Any help would be appreciated任何帮助,将不胜感激
Manifest显现
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
Application应用
@AcraCore(
reportContent = { /*APP_VERSION,*/ ANDROID_VERSION, PHONE_MODEL, CUSTOM_DATA, STACK_TRACE, LOGCAT}
)
@AcraMailSender(mailTo = "X@protonmail.com")
public class MyApplication extends Application {
@Override
protected void attachBaseContext(Context base) {
super.attachBaseContext(base);
ACRA.init(this);
}
I know this is dead post, nevertheless there's mistake in ACRA's site, example should be reading:我知道这是一个死帖,但是 ACRA 的网站上有错误,示例应该是:
@AcraCore(
buildConfigClass = org.acra.BuildConfig.class,
logcatArguments = {"-t", "200", "-v", "time"},
reportFormat= StringFormat.JSON,
reportContent = {
ReportField.USER_COMMENT,
ReportField.APP_VERSION_NAME,
ReportField.APP_VERSION_CODE,
ReportField.ANDROID_VERSION,
ReportField.PHONE_MODEL,
ReportField.CUSTOM_DATA,
ReportField.STACK_TRACE,
ReportField.LOGCAT }
)
@AcraMailSender(
mailTo = "email@domain.com"
)
我按照@gabe-sechan 的建议使用了 Crashlytics
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.