Skip to content Skip to sidebar Skip to footer

When A User Exit My Android App Without Clicking Logout Button The User Still Appears Loggedin In My Online Database

when a user exit my android app without clicking log out button the user still appears logged in in my online database, when next he opens the app he will be directed to the log in

Solution 1:

change the value to 0 in the onStop() method of the activity class which is called when your user navigates away from the app!

Solution 2:

For anyone else in the future I'm using firebase so this is what I did:

if (firebaseAuth.getCurrentUser()!= null)
{
    startActivity(new Intent(getApplicationContext(),NavActivity.class));
}

Post a Comment for "When A User Exit My Android App Without Clicking Logout Button The User Still Appears Loggedin In My Online Database"