Android Fabric-以自定义间隔发送捕获的异常 [英] Android Fabric - send Caught Exceptions at custom interval

查看:102
本文介绍了Android Fabric-以自定义间隔发送捕获的异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

根据Fabric文档 Fabric文档,以减少捕获的用户流量仅在应用程序启动时发送异常-

According to Fabric documentation Fabric doc to reduce user traffic, caught exceptions are sent only when the app launches -


Crashlytics在专用后台线程上处理异常,因此对应用程序的性能影响很小。为了减少用户的网络流量,Crashlytics会将批记录的异常一起批处理,并在下次应用启动时将其发送。

Crashlytics processes exceptions on a dedicated background thread, so the performance impact to your app is minimal. To reduce your users’ network traffic, Crashlytics batches logged exceptions together and sends them the next time the app launches.



try {
  myMethodThatThrows();
} catch (Exception e) {
  Crashlytics.logException(e);
  // handle your exception here!
}

但是对于此特定应用程序,该应用程序将始终处于打开状态,而不会打算重新推出。因此,问题是-

But for this particular app, the app will be always on, and is not intended to be relaunched. So the question is -

如何在一段时间或某些事件后强制发送日志?

推荐答案

Fabric的Mike。

Mike from Fabric here.

当前,我们的SDK无法提供从运行中的Android应用程序手动刷新或推送日志的方法。重新启动应用程序后会发送记录的异常。

Currently our SDK doesn't offer a way to manually flush or push over the logs from a running Android app. Logged exceptions are sent on relaunch of the app.

这篇关于Android Fabric-以自定义间隔发送捕获的异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆