How To Check If User Is Logged In Firebase Android

[Solved] How To Check If User Is Logged In Firebase Android | Swift - Code Explorer | yomemimo.com
Question : how to check if user is logged in firebase android and then load another activity

Answered by : cautious-cottonmouth-7o4sunsh2bxf

 private FirebaseAuth firebaseAuth; FirebaseAuth.AuthStateListener mAuthListener; firebaseAuth = FirebaseAuth.getInstance(); mAuthListener = new FirebaseAuth.AuthStateListener(){ @Override public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth){ FirebaseUser user = FirebaseAuth.getInstance().getCurrentUser(); if(user!=null){ Intent intent = new Intent(LoginActivity.this, MainActivity.class); startActivity(intent); finish();
} } };

Source : https://stackoverflow.com/questions/44583834/firebase-how-to-check-if-user-is-logged-in | Last Update : Wed, 20 May 20

Answers related to how to check if user is logged in firebase android and then load another activity

Code Explorer Popular Question For Swift