I have included the following in the html page:
<meta http-equiv="Content-Security-Policy" content="default-src *; style-src 'self' 'unsafe-inline'; script-src * 'unsafe-inline' 'unsafe-eval'">
Also, I managed to install the cordova-plugin-crosswalk-webview. However, now I am getting the error message "Request was denied for security".
Is there a reason you're using a plugin for sockets? Web sockets are supported on Android 4.4 and better.
You might need to include "ws:" in your CSP's default-src. (wss: for SSL)
Not really, but I included in case that was the problem. However, I just found the problem, the index.html page has to include the socket.io.min.js from the same server where it connects to. I previously had it like this <script src="https://cdnjs.cloudflare.com/ajax/libs/socket.io/1.4.8/socket.io.min.js"></script>.
It was finally solved by setting the socket.io script within <script></scrip> from the same domain as where it connects.
I have the same problem as you described but I can't follow your solution ..
In the android build I include <script src="serverdomain:port/socket.io/socket.io.js"></script> and I call in js io.connect("serverdomain:port") – but the io.connect is not working ...
what did you mean with "setting the socket.io script .. from the same domain as where it connects" ?
Hope, you can help me – would be great ..