I am trying to implement both a WebSocket client and a WebSocket server on a single Android device. Basically, I have two Android apps that need to communicate. I have implemented several test applications using LocalSockets successfully, but the target client application is a web browser application, so it can only use WebSockets.
I have tried implementing https://github.com/TooTallNate/Java-WebSocket . I have a Client application running in the foreground and a Server application running in the Android service in the background. Essentially, I accepted my LocalSocket implementations that work and replace LocalSockets with TooTallNate WebSockets. It looks like the WebSocket server is not starting. The obvious symptom is that the client side throws a NotYetConnectedException every time it tries to send something.
Another sign - if I try to use WebSocketServer.run () instead of WebSocketServer.start () I get an IOException from ServerSocketChannel.open ().
Any ideas are certainly welcome at this point. Thank you
source share