[英]What is the best way to set a Firebase Crash user identifier in a widget?
I have been using Crashlytics quite a lot, but now I'm trying out Firebase Crash in an app. 我已经使用Crashlytics了很多,但是现在我正在应用程序中尝试Firebase Crash。
I would like to set some kind of user identifier to be able to cross check reports sent by users themselves and crash reports. 我想设置某种用户标识符 ,以便能够交叉检查用户自己发送的报告和崩溃报告。
In Crashlytics I have always used Crashlytics.setUserIdentifier()
( https://docs.fabric.io/android/crashlytics/enhanced-reports.html?identifier#user-information ). 在Crashlytics中,我一直使用
Crashlytics.setUserIdentifier()
( https://docs.fabric.io/android/crashlytics/enhanced-reports.html?identifier#user-information )。
As far as I can see I have to use FirebaseCrash.log()
( https://firebase.google.com/docs/crash/android#create_custom_logs ), but that won't set the identifier one time, right? 据我所知,我必须使用
FirebaseCrash.log()
( https://firebase.google.com/docs/crash/android#create_custom_logs ), 但这不会一次设置标识符,对吗? I suppose it will log it every time I call that method. 我想每次调用该方法时它都会记录下来。
That leads me to the real question. 这使我想到了真正的问题。 The app is a widget with a service that runs relatively often without the user needing to access an activity.
该应用程序是一个具有服务的小部件,该服务运行相对频繁,而用户无需访问活动。 What will be the best place to do that logging?
进行日志记录的最佳位置是什么?
Using Crashlytics I have set the user identifier either in the main activity or in a class extending Application
. 使用Crashlytics,我可以在主要活动中或在扩展
Application
的类中设置用户标识符。 Doing the last of the two with Firebase Crash seems to trigger a known issue . 使用Firebase Crash进行两者中的最后一个似乎会触发一个已知问题 。
Currently there is no way to uniquely identify a user in a crash report. 当前,尚无法在崩溃报告中唯一标识用户。 We are considering ways to be able to do this without compromising the privacy of the individual user, which is very important to us.
我们正在考虑在不损害个人用户隐私的前提下做到这一点的方法,这对我们来说非常重要。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.