简体   繁体   English

Android Firebase-Analytics:无法将 null 设置为 userid 和 userproperty

[英]Android Firebase-Analytics : Not able to set null to userid and userproperty

I'm using below code snippet to clear userid and userproperty value by setting "null" but the value is getting retaining in GoogleAnalytics, Firebase.我使用下面的代码片段通过设置“null”来清除 userid 和 userproperty 值,但该值正在 GoogleAnalytics 中保留,Firebase。

FirebaseAnalytics.getInstance(context).setUserId(null); 
FirebaseAnalytics.getInstance(context).setUserProperty("sessionId", null); 

Userid and sessionid value will get set if user loggedin and if user logout userid and sessionid values needs to be clear.如果用户登录和用户注销,用户标识和会话标识值将被设置,用户标识和会话标识值需要被清除。

Can anyone help me to sort out this issue谁能帮我解决这个问题

Thanks, Kamal谢谢,卡马尔

I hit the same bug and opened a GitHub issue.I got that answer:我遇到了同样的错误并打开了一个 GitHub 问题。我得到了答案:

"It looks like the issue isn't the setUserId not working. The user id is indeed removed, but the debugView isn't showing this, so this is a UI issue. " “看起来问题不在于 setUserId 不起作用。用户 ID 确实被删除了,但 debugView 没有显示它,所以这是一个 UI 问题。”

Monitor the issue here: https://github.com/firebase/firebase-android-sdk/issues/3602在这里监控问题: https://github.com/firebase/firebase-android-sdk/issues/3602

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM