是否需要在 Android 应用程序的每个活动中调用 bugsense 崩溃处理程序?
我的应用程序有 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
联系 BugSense 后,
对于我来说,我一直将它放在应用程序活动上,并且运行良好。
After contacting BugSense,
As for me, I've been placing it on the Application Activity and it has been working fine.
我已经在几个应用程序中使用了它,通过在 Application 对象的 onCreate 中调用它(主要是这样它会捕获应用程序初始化中的任何错误。从 jar 的 v3 开始,我相信
setup 方法已删除,现在使用
initAndStartSession
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 useinitAndStartSession
您必须仅在活动上调用设置。
You have to call setup only on A Activity.