1FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser();
2if (user != null) {
3 // Name, email address, and profile photo Url
4 String name = user.getDisplayName();
5 String email = user.getEmail();
6 Uri photoUrl = user.getPhotoUrl();
7
8 // Check if user's email is verified
9 boolean emailVerified = user.isEmailVerified();
10
11 // The user's ID, unique to the Firebase project. Do NOT use this value to
12 // authenticate with your backend server, if you have one. Use
13 // FirebaseUser.getIdToken() instead.
14 String uid = user.getUid();
15}