This post has been brewing for a while but I finally took some time to finish it.
Ever wondered how you can do a push from your backend when on HTTP/2? Server-Sent Events is the answer to that. I wrote a piece on how it works and how to do it.
Read how to implement it both on backend (Spring Boot) and on Android.
Implementing Server-Sent Events with Spring Boot and Android
With HTTP/2 we can no longer use Web Sockets, so when we need to push data from the client to the server we need an alternative way. This is where Server-Sent Events come in. In this post, I will show how to implement it both in the backend, using Spring Boot, and on an Android client.