I am using FirebaseAuth.instance.signOut() in my code to logout from firebase but it closes the app entirely after logging out. This is the snippet of code I am using to logout of my app.
mLogout = (Button) findViewById(R.id.logout);
mLogout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
FirebaseAuth.getInstance().signOut();
Intent intent = new Intent(CustomerMapActivity.this, MainActivity.class);
startActivity(intent);
finish();
return; }
});
The app work perfectly without FirebaseAuth.instance.signOut(). Can someone help me please
I want to get some solution to my problem. It would really help me a lot as this is the only problem in my app.