Well, based on the principle that you have already created your alert or know how to create because you have not posted any code, you can do the following:
Assuming that the user enters some data in edits, and the alert has a positive button that will save this information and a model class that will work with this data, you will call the model class, which in this example is a class of users.
In the Model class, in addition to the variables and getters and Setters you will have this method:
public void salvar(){
DatabaseReference banco = FirebaseDatabase.getInstance().getReference();
banco.child("USUARIOS").push().setValue(this);
}
Now it's enough for you in the positiveButton method of alert to create the following call:
Usuarios usuarios = new Usuarios();
usuarios.setNome(editNome.getText().toString());
usuarios.setEmail(editEmail.getText().toString());
usuarios.setTelefone(editTelefone.getText().toString());
usuarios.salvar();
dismiss();//para fechar o alert
Or you can do this update without the template class, sending given by die when the positive button of the alert is clicked like this:
DatabaseReference banco = FirebaseDatabase.getInstance().getReference();
banco.child("USUARIOS").push().setValue("nome", etNome.getText().toString())
.setValue("email", etEmail.getText().toString());
The two options should work, there it is to your creitério although I recommend to use the models classes to leave the work better organized.
Any questions are available!