firebase sendUnsentReports()仅在重新启动后发送异常 [英] firebase sendUnsentReports() sends exceptions only after restart

查看:74
本文介绍了firebase sendUnsentReports()仅在重新启动后发送异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想通过recordException()方法发送有关用户非致命异常的信息,但是默认的crashlytics实现仅在应用重启后才发送(这是很奇怪的行为o_O)

I want to send info about user non-fatal exceptions through recordException() method, but default crashlytics implementation sends them only after app is restarted (which is quite a strange behaviour o_O)

我试图通过setCrashlyticsCollectionEnabled(false)方法禁用自动报告收集,并通过sendUnsentReports()手动发送报告,但是,很遗憾,firebase仅在重新启动应用程序后才继续发送报告.

I tried to disable automatic reports collection through setCrashlyticsCollectionEnabled(false) method and send them manually through sendUnsentReports(), but, alas, firebase continues to send them only after the app is restarted.

有人解决了那种问题吗?

Has anybody solved that kind of a problem and how?

推荐答案

是的,这是预期的.记录的异常在记录时不会立即发送,否则将以随机的间隔发送拉取请求,这将占用大量带宽和电量.

Yes, that’s expected. Logged exceptions are not sent immediately when they are recorded, otherwise there would be pull requests at random intervals which would use up a lot of bandwidth and battery.

它们是在启动时或崩溃时批量发送的,当您调用sendUnsentReports时,所有已缓存的报告均在该时间发送,但它不发送当前会话中的任何内容.

They are batched and sent either on startup or at crash time, and when you call sendUnsentReports, all cached reports are sent at that time, but it doesn’t send anything from the current session.

这篇关于firebase sendUnsentReports()仅在重新启动后发送异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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