Get user_pseudo_id from firebase client sdk?

大城市里の小女人 提交于 2020-02-05 06:55:23

问题


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?

Thanks so much!


回答1:


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.

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.



来源:https://stackoverflow.com/questions/56431394/get-user-pseudo-id-from-firebase-client-sdk

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!