[Solved]How do I connect to websocket on Android (phonegap)?

Get help using Construct 2

Post » Mon Dec 26, 2016 8:22 pm

Hi everyone,

I am working on a small prototype that sends log information to a nodeJS server via the websocket protocol. Everything works fine in preview, however, if I export my prototype and built it for Android via Phonegap, the apk cannot connect to my server.

I did not find any network specific permissions when exporting in Construct.

I really hope someone has an idea.


EDIT: Little update from my side. I checked for websocket support both in chrome under Android and my exported APK and both return true. So the support itself seems to be there, however, nothing is sent to my server. Trying the same thing on chrome for Mac/Windows does sent information to my server.

EDIT2: I solved it. Android is requiring a secure websocket connection. It will not connect to a non-secure websocket. Hope this will help someone. :)
Posts: 21
Reputation: 1,351

Return to How do I....?

Who is online

Users browsing this forum: Kyledfrank and 3 guests