1

I am new to firebase. I am developing Android app and have the following goals

  1. Add data to firebase from an android form (client device 1) - This is done
  2. Retrieve all the data in the listview (client device 2) - This is done
  3. Click on the listview item (The list view is diplaying "Name" field) to open the details of that particular child (client device 2) - Need help with this step.

The data structure is:

consumers
 -KTQ-mTbgwRDUh-1IUJ9
 Age: "29"
 BrandUsage: "brand1"
 Mobile: "03212335775"
 Name: "Abubaker"

 -KTSyFcPh_cAS_C-ZVIm
 Age: "45"
 BrandUsage: "brand2" 
 Mobile: "04346494946"
 Name: "Abubaker S"
Abubaker
  • 103
  • 11
  • See http://stackoverflow.com/questions/39411408/how-to-open-a-new-activity-when-an-item-is-clicked-in-firebase-recyclerview/39413452#39413452 and http://stackoverflow.com/questions/39848072/retrieving-the-firebase-key-from-onitemclick-in-firebaselistadapter – Frank van Puffelen Oct 07 '16 at 13:52
  • In step two you are already retrieving data, hence use listviews adapter position to get it on item click. (`yourlist.get(adapterPosition).getDetails()`) – hrskrs Oct 07 '16 at 13:54
  • 1
    BUt I am not using firebaselist adapter. The duplicate article solves this problem by using firebaselist adapter – Abubaker Oct 07 '16 at 14:16

0 Answers0