简体   繁体   English

在小部件中设置Firebase Crash用户标识符的最佳方法是什么?

[英]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.

相关问题 显示用户离线的最佳方式 - Firebase Android - Best way to show user is offline - Firebase Android 将用户链接到 Firebase 中的数据的最佳方式? - Best way to link a user to their data in Firebase? 使用 Firebase 刷新列表的最佳方法是什么 - What is the best way to refresh a list using Firebase 将有声读物上传到 firebase 的最佳方式是什么? - What is the best way to upload audio books to firebase? 有没有办法在Firebase崩溃报告中设置键值对? - Is there any way to set key-value pairs in Firebase Crash Reporting? 什么是 &#39; <OR> &#39;在firebase崩溃堆栈? - What is '<OR>' in firebase crash stack? 为Honeycomb平板电脑设计应用程序小部件的最佳方法是什么? - What's the best way to design app widget for Honeycomb tablets? 让应用程序小部件与服务通信的最佳方法是什么 - What is the best way to let an app widget communicate with a service 什么是在Android中存储用户数据的最佳方法 - What is best way to store user data in Android 在Android应用中验证用户身份的最佳方法是什么? - What is the best way to authenticate user in a Android app?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM