This PR adds a class to communicate with our backend. There is a test activity here that shows how to use it, but basically here is how it goes when you want to retrieve data from the backend:
create a new ServerCommunicator object with a View argument
create a ServerResponseAction object to act as a callback (what to do with the response)
create a ServerErrorAction object if desired to handle errors
Set the error action with ServerCommunicator.setErrorAction()
A default error handler is provided that logs the error and displays a message
call the desired service from the helper functions in ServerCommunicator
This PR adds a class to communicate with our backend. There is a test activity here that shows how to use it, but basically here is how it goes when you want to retrieve data from the backend:
ServerCommunicator
object with aView
argumentServerResponseAction
object to act as a callback (what to do with the response)ServerErrorAction
object if desired to handle errorsServerCommunicator.setErrorAction()
ServerCommunicator
requestViewStreamData()
in the test activity