我想通过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()仅在重新启动后发送异常
发布评论