Forums

OverviewFelgo 2 Support (Qt 5) › Unable to connect to websocket server on Android QML App

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #16888

    paul grant

    Hi,

    I’ve taken the basic websocket server example from qt5.9, place it in a vplay project

    and tried to connect to it from a linux based websocket client, but it refuses to accept

    a connection. I see the error in the node console.

    The same vplay app will accept connection if run as a linux desktop app?!?

     

    On Android i’m using APK19.

     

    To test if websockets can work in this way on android I’ve downloaded an

    app from the android store and found I can connect to it fine!

     

    I checked permissions on the app and found the following:

    ACCESS_NETWORK_STATE

    ACCESS_WIFI_STATE

    CHANGE_NETWORK_STATE

    CHANGE_WIFI_STATE

    INTERNET

    I’ve added these to the vplay app, but it still refuses to accept connection!

     

    Is there a separate permission required for QT/QML network access?

    What would cause this?

     

    Any help would be appreciated!

    BR

    Paul Grant

     

    #16894

    Alex
    Felgo Team

    Hi Paul,

    just to clarify: Your app can connect to the webserver if running on desktop (Linux) but cannot connect if running on Android?

    Does the same happen without using Felgo, so just running the plain Qt webserver example?

    If yes, then please also post this on the official Qt forums to get some more input on this, since it might be a Qt related issue.

    Cheers,
    Alex

Viewing 2 posts - 1 through 2 (of 2 total)

RSS feed for this thread

You must be logged in to reply to this topic.

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support