Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-42088

Networking doesn't seem to work at all on Android

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P1: Critical P1: Critical
    • 5.4.0 RC
    • 5.4.0 Beta
    • Network
    • None
    • Android, Qt 5.4.0 beta

      No networking examples with Qt Quick seems to work for me with 5.4 beta.
      I have created a minimum example below that simply tries to GET www.google.com and see if you get a reply. To reproduce just create a new project, add the manifest and add the "android.permission.INTERNET" permission. This works perfectly well on 5.3.2 but never responds in 5.4 beta. If there are changes I need to make this work, that should be documented somewhere. If not, I think you have a pretty big showstopper on your hands...

      import QtQuick 2.3
      import QtQuick.Window 2.2
      
      Window {
          id: window
          visible: true
          width: 640
          height: 480
          Text {
              id: label
              anchors.centerIn: parent
              font.pixelSize: 30
              text: "Waiting..."
          }
          Component.onCompleted:  {
              var req = new XMLHttpRequest ();
              req.open ('GET', 'http://www.google.com/', true);
              req.onreadystatechange = function (aEvt) {
                  if (req.readyState == 4 && req.status == 200) {
                      label.text = "We got a reply!"
                      window.color = "lightgreen"
                  }
              };
              req.send();
          }
      }
      
      

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            stromme Christian
            bachewii Jens
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes