I deleted all my collections and also went to the authentication tab in Firebase and deleted all users. I then went to Android studio and hit the stop button, then hit the play button again. Upon start, Logcat says that the user is still logged in:
2020-12-25 17:20:05.410 29800-29800/com.example.mumble2 E/ActivityGroups: 1
2020-12-25 17:20:05.444 29800-29800/com.example.mumble2 E/ActivityGroups: User is not null
2020-12-25 17:20:05.444 29800-29800/com.example.mumble2 E/ActivityGroups: User: com.google.firebase.auth.internal.blah
And the app stays on the Groups activity too (the app's launcher acitivty), instead of going to the login/signup activity. What am I doing wrong? Why isn't the app recognizing that the user's account was deleted?
class ActivityGroups : AppCompatActivity() {
private val firebaseAuth = FirebaseAuth.getInstance()
private val authStateListener = FirebaseAuth.AuthStateListener { firebaseAuth ->
val firebaseUser = firebaseAuth.currentUser
if (firebaseUser != null) {
Log.e(tag, "User is not null")
Log.e(tag, "User: $firebaseUser")
loadGroups()
} else {
Log.e(tag, "User is null")
Log.e(tag, "User: $firebaseUser")
val intent = Intent(this, ActivityLoginSignup::class.java)
startActivity(intent)
finish()
}
}
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_groups)
Log.e(tag,"1")
...irrelevant buttons...
}
}