1
I have 2 models , the courier and the vehicle , I need to save the data of the two models in the same id
of database, I did it this way, I used the vehicle. salvarDados();
but did not save:
private void cadastrarEntregador() {
autenticacao = ConfiguracaoFirebase.getFirebaseAutenticacao();
autenticacao.createUserWithEmailAndPassword(
entregador.getEmail(),
entregador.getSenha()
).addOnCompleteListener(
CadastroEntregadorActivity.this,
new OnCompleteListener<AuthResult>() {
@Override
public void onComplete(@NonNull Task<AuthResult> task) {
if (task.isSuccessful()) {
snack("Conta criada com sucesso");
entregador.setId(task.getResult().getUser().getUid());
entregador.salvarDados();
veiculo.salvarDados();
Post the code of
salvarDados()
, please. This way I can better understand the problem.– Amelco