Skip to content

Instantly share code, notes, and snippets.

View metes's full-sized avatar
🎯
Focusing

Mete Soydaş metes

🎯
Focusing
View GitHub Profile
private void addListenerForChatRoomStillExits() {
String currentUserId = SessionManager.getInstance().getString(Constant.FIREBASE_CURRENT_USER_ID);
userDatabase.child("users").child(currentUserId).child("conversations").orderByChild("isAccepted").equalTo(true).addValueEventListener(new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
boolean isRoomExits = false;
if (dataSnapshot.exists()) {
for (DataSnapshot data : dataSnapshot.getChildren()) {
Object object = data.getValue();
HashMap lastMap = (HashMap) object;