0 Favourites

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

  • 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.

    Cheers,

    Toby

    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.

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)