3

I've been trying to listen fail events for user authentication. For testing purpose I closed my internet connection and try to sign up. Neither onFailureListener or !task.isSuccessful invokes. So how do you guys listen for failed events?

adjuremods
  • 2,938
  • 2
  • 12
  • 17

1 Answers1

2

Firebase doesn't response listener when no internet, for check internet connection you can do it programmatically

if(isNetworkAvailable()){
    //
    // Authentication with Firebase
    // 
}else{
    //Display message/aleart "No internet connection" to user
}

To check isNetworkAvailable(), please see HERE

Community
  • 1
  • 1
Linh
  • 57,942
  • 23
  • 262
  • 279