Recover child within getKey

1

I have a Recycler adapter with a populateViewHolder which when I click takes the child's key in the firebase, in the case of the image below it takes KeGVDMcSt0v5HICwuUm

  @Override
  protected void populateViewHolder(ChatViewHolder viewHolder, Chat model, int position) {
  final String post_key = getRef(position).getKey();

so are the child

IsendthekeytotheotheractivitywithsingleBlogIntent.putExtra"blog_id", post_key);

and recover with mPost_key = getIntent().getExtras().getString("blog_id");

I just need to get the value uid hC7y1BKtAWTFR&zoXVkr3oYjLTS2 within that child.

I can not explain in technical terms, much less if the title matches the question, Thank you from now on.

Update

I want to recover from mode, compare uid which in case would have to be "blog_id" and get the user from id in child Users

   final String currentUserId = getIntent().getExtras().getString("blog_id");
   mDatabaseCurrentUser = FirebaseDatabase.getInstance().getReference().child("Users");
   mQueryCurrentUser = mDatabaseCurrentUser.orderByChild("uid").equalTo(currentUserId)
    
asked by anonymous 04.03.2017 / 02:32

0 answers