0
When logging in, I want a load bar to appear while the login is being done. How do I get the process (time, size...) of Firebase to increment in the progress bar?
Follow the login code:
private void efetuarLogin() {
final FirebaseAuth autenticacaoFirebase = ConfiguracaoFirebase.getFirebaseAuth();
autenticacaoFirebase.signInWithEmailAndPassword(
usuario.getEmail(),
usuario.getSenha()
).addOnCompleteListener(new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
// FirebaseUser firebaseUser = autenticacaoFirebase.getCurrentUser();
telaPrincipal();
} else {
String erroExcecao = "";
try {
throw task.getException();
} catch (FirebaseAuthInvalidCredentialsException e) {
erroExcecao = "E-mail inválido e/ou senha incorreta";
MetodosAuxiliares.Alert(LoginActivity.this, erroExcecao);
} catch (Exception e) {
e.printStackTrace();
MetodosAuxiliares.Alert(LoginActivity.this, "Verifique seu e-mail e/ou senha");
}
}
}
});
}
Although this shows a Progressdialog, I do not believe that there is a way to recover the current progress of Sign in
– Lennoard Silva
Hello, it even worked, but it’s depreciated. Thanks anyway.
– Cayque Duarte