I am working on an application where I want to add items in the wishlist section. I have some data which I am fetching from the firestore in recyclerview on each item I have a heart icon when someone clicks on that icon that particular item should be added to the wishlist section. I am new to android please guide me on how can I achieve this or refer to any document thank you
CodePudding user response:
Do the following thing -
- Create one collection name with Wishlist
- When the user clicks on a particular Item heart and adds respective data with the Item Id and userId in Wishlist collection, It will create one document.
- Fetch data from Wishlist collection to show user wishlist using a query like get data from Wishlist collection by userId using where clause.