// In my ViewModel that is setup to use Room I use the following in a function
// The dao returns a LiveData object and I call getValue() to get the value
{
List<Item> items = (List<Item>) dao.loadAllByParentId(id).getValue(); // This is null
deleteItems(items);
}
The application then throws an NullPointerException somewhere else which I have traced to this piece of code. I'm not too experience in Android so I know this may seem trivial for some of you, but please if you could help I would appreciate it.