I have added bottom navigation bar and the home fragment is set as the main page of the app but the code which checks if the user is logged in or not is not working, every time, if I log out the app, should start from login but it starts from the home fragment.
Firebase mAuth = FirebaseAuth.getInstance();
@Override
protected void onStart() {
super.onStart();
FirebaseUser currentUser = mAuth.getCurrentUser();
if (currentUser == null){
sendStart();
}
}
I have added this code but still, if the user is null it opens the main page and every time I restart the app it opens the main page of activity