I have the following architecture:
There is my backend (spring boot), with can receive data from my client (android device) over a REST api and it also provide data over the REST api.
The data which are provided, change from time to time, without a dependency from the data the client send.
Is it now possible in android to write a callback for the data which the backend provided?
You could do it with a button, but I want to get the new data automatically when ever they change. How would you do it, with a timer/interval?
For example I know Firebase (from Google), where you can do something like this, there you can define a callback and get the new data when ever they change...something like this is what I want.