Accessing Google Account Id /username via Android

后端 未结 7 2251
夕颜
夕颜 2020-11-28 02:11

How do you access the user\'s Google Account Id / username in code? I am building an application that will call a web service to store data and I want to identify the ident

7条回答
  •  离开以前
    2020-11-28 02:41

    String name = android.os.Build.USER;
    
    if (!TextUtils.isEmpty(name)) {
        nameEdit.setText(name);
    }
    

提交回复
热议问题