As in title. I have a String shoppingListId
which holds current clicked in RecyclerView
documentID and I wonder how to delete this selected document ID.
I tried the following one but it doesn't works because of Incompatible types:
FirebaseFirestore docRef = FirebaseFirestore.getInstance();
DocumentReference selectedDoc = docRef.collection("products").document(shoppingListId);
selectedDoc.delete();
How to get Instance to DocumentReference, and then delete selected document? I guess this is probably so easy, but Im stuck at it.
Changed the code, there aren't any Errors right now, but still it doesn't works.