I have a list declared in my mainactivity, also calling the service from there but I have encountered some problems with trying to add items to the list I have from my service.
A little background, my service is doing some fetching of data and I save the response to a list I have in my main activity.
Currently, I'm doing it like this:
Activity activity = new Activity();
activity.addError(error);
My main activity is like this:
List<String> errorList = new ArrayList<>();
public void addError(String error) {
errorList.add(error);
}
I'm really quite not sure with all of this. I hope you can help. Thank you.