问题
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