gpt4 book ai didi

android - firebase_crashlytics_collection_enabled 在新的 Firebase Crashlytics SDK 中不起作用

转载 作者:行者123 更新时间:2023-12-05 00:05:12 30 4
gpt4 key购买 nike

在 Fabric 将于 3 月 31 日关闭后,我尝试使用新的 Firebase Crashlytics SDK,目前处于测试阶段。

我会尽力确保只有在征得用户同意后才会传输崩溃日志。在documentation他们提到了以下内容:

By default, Crashlytics automatically collects crash reports for all your app's users. To give users more control over the data they send, you can enable opt-in reporting for your users by disabling automatic collection and initializing Crashlytics only for selected users:

  1. Turn off automatic collection with a meta-data tag in your AndroidManifest.xml file:

    <meta-data
    android:name="firebase_crashlytics_collection_enabled"
    android:value="false" />

不幸的是,这在我的应用程序中不起作用。在我故意让应用程序崩溃后,崩溃仍然会自动传输。

我如何确保不会自动传输崩溃?

最佳答案

如果您调用sendUnsentReports(),那将是override setCrashlyticsCollectionEnabled 设置。此外,在自动收集的更改生效之前,有必要重新启动应用程序。

如果用户已禁用选择加入报告,导致错误,然后启用报告,则之前累积的任何未发送报告将在选择加入启用时全部发送,因此也有必要 deleteUnsentReports( ) 在启用选择加入报告之前。

关于android - firebase_crashlytics_collection_enabled 在新的 Firebase Crashlytics SDK 中不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60618036/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com