firebase sendUnsentReports()仅在重新启动后发送异常

编程入门 行业动态 更新时间:2024-10-26 08:33:56
本文介绍了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()仅在重新启动后发送异常

本文发布于:2023-11-25 12:24:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1629739.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:重新启动   异常   firebase   sendUnsentReports

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!