是否需要在 Android 应用程序的每个活动中调用 bugsense 崩溃处理程序?

发布于 2024-12-11 05:45:19 字数 133 浏览 4 评论 0原文

我的应用程序有 3 个活动 A、B 和 C。 从A(“家”)我可以启动B,从B我可以启动C。

我是否必须仅在A中或B和C中调用BugSenseHandler.setup(this, MY_API_KEY);

My app has 3 activities A,B and C.
From A (the "home") i can start B and from B i can start C.

Do i have to call BugSenseHandler.setup(this, MY_API_KEY); only in A or also in B and C?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

春庭雪 2024-12-18 05:45:19

联系 BugSense 后,

Android,2 月 26 日 13:42(东部时间):您好,感谢您与我们联系,
您可以将其放置在应用程序活动上,或者放置在第一个活动上
在您的项目上运行的活动。在文档中我们建议
第二种做法,因为对于大多数人来说它更容易、更快
开发人员。

------------------------------------------------------------ -------------------------------------------------- ----- BugSense

对于我来说,我一直将它放在应用程序活动上,并且运行良好。

After contacting BugSense,

Android, Feb 26 13:42 (EET): Hello and thank you for contacting us,
you can place it either on the application activity, or on the first
activity that runs on your project. In the documentation we suggest
the second practice, since it's easier and quicker for the majority of
the developers.

------------------------------------------------------------------------------------------------------ BugSense

As for me, I've been placing it on the Application Activity and it has been working fine.

梦在深巷 2024-12-18 05:45:19

我已经在几个应用程序中使用了它,通过在 Application 对象的 onCreate 中调用它(主要是这样它会捕获应用程序初始化中的任何错误。从 jar 的 v3 开始,我相信 setup 方法已删除,现在使用 initAndStartSession

@Override
    public void onCreate() {
        super.onCreate();
        BugSenseHandler.initAndStartSession(this, BUG_SENSE_API_KEY);
    }

I've used it in several app by calling it in the onCreate of Application object (mainly so it'll catchup any errors in the app initialisation. It's also worth noting as of v3 of the jar i believe the setup method is remove and now use initAndStartSession

@Override
    public void onCreate() {
        super.onCreate();
        BugSenseHandler.initAndStartSession(this, BUG_SENSE_API_KEY);
    }
隔纱相望 2024-12-18 05:45:19

您必须仅在活动上调用设置。

You have to call setup only on A Activity.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文