title: Firebase one to one chat android
body: <p>I am bit confused to create one to one firbase chat application .</p>
  
  <p>My requirement is i need to show the chat list for each users(History of user chats). Once the user clicks one user from list i want to show the one to one chat window with selected user.</p>
  
  <p>but with my format when i send a message to any user all the user got that message and i cant show filtered chat list for particular user it show all the chat history from firebase database</p>
  
  <p>this is my json strucure in firebase</p>
  
  <p><a href="https://i.stack.imgur.com/E6mEx.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/E6mEx.png" alt="enter image description here"></a></p>
  
  <p><strong>java code</strong></p>
  
  <pre><code>    static final String CHAT_REFERENCE = "lifegoal";
  
  ChatFirebaseAdapter firebaseAdapter = new  ChatFirebaseAdapter(mFirebaseDatabaseReference.child(CHAT_REFERENCE), userModel.getName(), this);
      rvListMessage.setLayoutManager(mLinearLayoutManager);
      rvListMessage.setAdapter(firebaseAdapter);
  </code></pre>