I am currently trying to remove an element from the array currently stored in firestore.
I have checked everywhere even the firestore documentation and what they suggest is not working. This is currently my code and so far it does nothing when trying to delete from listview.
Map<String, Object> note = new HashMap<>();
note.put("posts", FieldValue.delete());
documentReference.update("posts", FieldValue.arrayRemove(listView.getItemAtPosition(position).toString()));
usersEmotions.remove(listView.getItemAtPosition(position).toString());
listView.setAdapter(listAdapter);
listAdapter.remove(listView.getItemAtPosition(position).toString());
