Created
November 23, 2017 12:01
-
-
Save kenny-io/2b8f5050418aaad2e32035277c94b9eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ProfileActivity extends AppCompatActivity { | |
private FirebaseAuth mAuth; | |
private FirebaseUser user; | |
private TextView Email; | |
private TextView Uid; | |
private Button logout; | |
@Override | |
protected void onCreate(Bundle savedInstanceState) { | |
super.onCreate(savedInstanceState); | |
setContentView(R.layout.activity_profile); | |
Email = (TextView)findViewById(R.id.profileEmail); | |
Uid = (TextView)findViewById(R.id.profileUid); | |
mAuth = FirebaseAuth.getInstance(); | |
logout = (Button)findViewById(R.id.button_logout); | |
user = mAuth.getCurrentUser(); | |
if (user != null){ | |
String email = user.getEmail(); | |
String uid = user.getUid(); | |
Email.setText(email); | |
Uid.setText(uid); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment