从Firebase客户端SDK获取user_pseudo_id? [英] Get user_pseudo_id from firebase client sdk?
本文介绍了从Firebase客户端SDK获取user_pseudo_id?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在Firebase Analytics中,user_pseudo_id
自动登录到bigquery.但是,我想在Firebase客户端sdk(例如:android,ios sdk)中获取此值以指定用户.
我在firebase的文档中找到了,但是找不到关于此问题的任何参考.有什么建议吗?
In the Firebase Analytics, user_pseudo_id
is automatically log into bigquery. But, I want to get this value in the firebase client sdk (ex: android, ios sdk) to specify user.
I found on docs of firebase but couldnt found any reference about this issue of my. Have any suggest to get it?
非常感谢!
推荐答案
I just found it, it is documented here. I also tested that it returns values that I can find in the BigQuery user_pseudo_id
column.
适用于android的示例
Example for android:
FirebaseAnalytics.getInstance(this).getAppInstanceId().addOnCompleteListener(new OnCompleteListener<String>() {
@Override
public void onComplete(@NonNull Task<String> task) {
if (task.isSuccessful()) {
String user_pseudo_id = task.getResult();
}
}
});
I am not sure about IOS but it may be this one.
这篇关于从Firebase客户端SDK获取user_pseudo_id?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文