public void createArtist()//View view ES PARA HACER FUNCIONAR EN ONCLICK EN XML
{
final String giro = spingiro.getSelectedItem().toString();
final String sexo = spinsexo.getSelectedItem().toString();
final String pais = spinpais.getSelectedItem().toString();
final String estado = spinestado.getSelectedItem().toString();
final String ciudad = spinciudad.getSelectedItem().toString();
HashMap<String, String> Personal = new HashMap<>();
Personal.put("id", databaseReference.push().getKey());
Personal.put("correo", edtRegCorreoSocio.getText().toString());
Personal.put("contraseña",edtRegContraSocio.getText().toString());
Socios socios = new Socios(databaseReference.push().getKey(), edtRegCorreoSocio.getText().toString(),
edtRegContraSocio.getText().toString(), edtRegNombreCompleto.getText().toString(),
edtRegNombreNegocio.getText().toString(), giro,
edtRegAntiguedad.getText().toString(), edtRegRfc.getText().toString(), edtRegMovil.getText().toString(), sexo, ciudad, Personal);
databaseReference.child("Socios").child(giro).child(socios.getId()).setValue(socios);
//PARA LIMPIAR EL EDITTEXT DESPUES DE DAR CLICK AL BOTON
edtRegContraSocio.getText().clear();
edtRegCorreoSocio.getText().clear();
edtRegNombreCompleto.getText().clear();
edtRegAntiguedad.getText().clear();
edtRegRfc.getText().clear();
edtRegMovil.getText().clear();
edtRegNombreNegocio.getText().clear();
}
Доброе утро !!Я пытаюсь 4 дня, и я просто не могу это сделать !!Как я могу поместить узел с уникальным ключом в мои значения, используя Firebase и Android Studio.Я просто добавляю, что мне нужно делать со скриншотами!
Вот мой DB
Вот мой POJO
А вот и мой код