I'm using below code to nevigate to loginActivity from mainActivity but the condition inside if() is getting false

Viewed 30

mAuth = FirebaseAuth.getInstance();

FirebaseUser user = mAuth.getCurrentUser();

if (user == null) {

startActivity(new Intent(MainActivity.this, LoginActivity.class));

}

0 Answers
Related