title: How connect android device to Spring websocket server
body: <p>Im trying to  connect android device to the Spring websocke sever. 
  But all libs give me errors. Im starting my Spring websocket server on computer and client is in the same network, so im trying to conntect by ip of computer. </p>
  
  <p><strong>This is sevrer properties</strong></p>
  
  <pre><code>@Configuration
  @EnableWebSocketMessageBroker
  public class WebSocketConfig 
     extends AbstractSessionWebSocketMessageBrokerConfigurer&lt;ExpiringSession&gt; {
  
  @Override
  protected void configureStompEndpoints(StompEndpointRegistry registry) {
      registry.addEndpoint("/anveo-appserver").withSockJS();
  }
  
  @Override
  public void configureMessageBroker(MessageBrokerRegistry registry) {
      registry.enableSimpleBroker("/topic/", "/anveo/");
      //registry.enableStompBrokerRelay("/queue/", "/topic/", "/exchange/");
      registry.setApplicationDestinationPrefixes("/app");
     }
  }
  </code></pre>
  
  <p><strong>And this is example of using my stomp client.</strong> </p>
  
  <pre><code>public class StompWebSocketHandler {
  
  private LoggerHelper logger = LoggerHelper.get(this.getClass());
  
  public void connect() {
      StompClient mStompClient;
  
  
      mStompClient = Stomp.over(WebSocket.class, "ws://172.26.252.197:8443/app/anveo-appserver/websocket");
  
      mStompClient.lifecycle().subscribe(new Action1&lt;LifecycleEvent&gt;() {
          @Override
          public void call(LifecycleEvent lifecycleEvent) {
              switch (lifecycleEvent.getType()) {
  
                  case OPENED:
                      logger.log("Stomp connection opened");
                      break;
  
                  case ERROR:
                      logger.log("Stomp connection error");
                      logger.log(lifecycleEvent.getException().toString());
                      break;
  
                  case CLOSED:
                      logger.log("Stomp connection closed");
                      break;
              }
          }
      });
      mStompClient.connect();
  }
  </code></pre>
  
  <p>}</p>
  
  <p><strong>Can anyone tell me what Im doing wrong?</strong></p>