Results 1 to 6 of 6

Thread: QNetworkAccessManager not receiving data in Android, but works in Desktop

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jul 2013
    Posts
    7
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default QNetworkAccessManager not receiving data in Android, but works in Desktop

    I have a very simple GET request, which works fine in Desktop Qt, but no data is returned when I run it on Android:

    Qt Code:
    1. QNetworkManager m_WebCtrl;
    2. QNetworkReply reply;
    3. QUrl url("http://www.google.com");
    4. request.setUrl(url);
    5. reply = m_WebCtrl.get(request);
    6.  
    7. // Infinite loop to watch the data come in
    8. while (1) {
    9. qDebug()<< "Data! " << reply->bytesAvailable();
    10. }
    To copy to clipboard, switch view to plain text mode 

    The Android device has an IP address that is in the valid range. I don't see any errors with reply->error(). What can this be related to?

    Edit: I should add that I'm using Qt 5.4 beta.
    Last edited by kubark42; 7th November 2014 at 06:01.

Similar Threads

  1. Deploying desktop application on android
    By Baso in forum Installation and Deployment
    Replies: 0
    Last Post: 3rd December 2013, 18:08
  2. Kit Desktop is incompatible with kit Android for x86 (GCC 4.7, Qt 5.1.0).
    By tsuibin in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 25th July 2013, 09:20
  3. Problem with receiving Data from TcpSocket
    By Basti300 in forum Qt Programming
    Replies: 0
    Last Post: 15th July 2010, 14:41
  4. QTcpSocket + receiving data
    By navi1084 in forum Qt Programming
    Replies: 1
    Last Post: 2nd June 2009, 08:10
  5. data at fifo's receiving end has arrived?
    By quickNitin in forum General Programming
    Replies: 4
    Last Post: 5th November 2006, 10:05

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.