Created
January 22, 2018 12:20
-
-
Save AnkitSuda/34d2e3d3619dba8f6699af41ed8e75b7 to your computer and use it in GitHub Desktop.
FRA add data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| button.setOnClickListener(new View.OnClickListener() { | |
| @Override | |
| public void onClick(View view) { | |
| DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference().child("posts").push(); | |
| Map<String, Object> map = new HashMap<>(); | |
| map.put("id", databaseReference.getKey()); | |
| map.put("title", editText.getText().toString()); | |
| map.put("desc", etd.getText().toString()); | |
| databaseReference.setValue(map); | |
| } | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
can you tell me what is those parameters
how i identify ?