Connect with iOS and Android clients to SockJS Backend Connect with iOS and Android clients to SockJS Backend ios ios

Connect with iOS and Android clients to SockJS Backend


Maybe it's more than a year since the question was asked. But, because it's getting in the first results when Googling for SockJS+Android. So, I am posting my answer.

From my experience with a recent project I worked on, we were able to use a STOMP client - like the one here- to connect to Spring Websocket backend from native Android app.

And from the browser, you can still use SockJS client to gain across browsers compatibility to websockets with fallback.

A note to mention that when using only STOMP client to connect to native websocket the URL will be something like ws://mydomain/SockJSEndpoint/websocket, and when using SockJS client from the browser the URL will be like http://mydomain/SockJSEndpoint.


We have tested them, both Android-client (link) was given by @Amr K. Ismail and

this iOS-client (link) are suitable with Spring-SockJS-Server which has STOMP.