Guest User

Untitled

a guest
Oct 19th, 2018
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. DatabaseReference ref = FirebaseDatabase.getInstance().getReference();
  2.  
  3. ref.child("Messages").child(sendersID).child(RecieversID).addValueEventListener(new ValueEventListener() {
  4. @Override
  5. public void onDataChange(DataSnapshot dataSnapshot) {
  6. for(DatasnapShot snapshot: dataSnapshot.getChildren()){
  7. snapshot.child("Seen").setValue(true);
  8.  
  9. }
  10. }
  11.  
  12. @Override
  13. public void onCancelled(DatabaseError databaseError) {
  14. System.out.println("Fallo la lectura: " + databaseError.getCode());
  15. }
  16. });
Add Comment
Please, Sign In to add comment