×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    3

    App blocking if no network access

    Hi,

    my Qt application is blocking when there is no network (internet) access.

    When there is network everything works as expected, but as soon as it tries to access something without network it blocks and the only way to stop it is shutting down the phone.

    The same code works perfectly on desktop.

    Im using QNetworkAccessManager to do the network accesses.

    Alternatively, is there any reliable way to check if there is network connectivity? I saw the Bearer API, but had no luck to make it check if there is any network available now.

    Thanks.

  2. #2
    Nokia Developer Expert
    Join Date
    Jun 2007
    Location
    Moscow, Russia
    Posts
    1,355

    Re: App blocking if no network access

    Bearer API should allow you to do that. Pls check that sample:
    http://doc.qt.nokia.com/qtmobility-1...ermonitor.html
    It displays system online\offline state.
    QNetworkAccessManager can't be used for that: http://bugreports.qt.nokia.com/browse/QTBUG-14631

    But i strongly recommend to find the reason of your app behaviour. You should check which method is stuck (called synchroniously and execution doesn't continue after its call). Or if network errors are handled properly by your app.

  3. #3
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: App blocking if no network access

    Take also into account that since Qt 4.7 Bearer API has been merged into QtNetwork.
    http://doc.qt.nokia.com/latest/qnetw....html#isOnline

Similar Threads

  1. return KErrNotReady after long time no access network
    By Julischeng in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2010-06-01, 16:29
  2. Nokia 6600 network - No access
    By vrutank in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2006-12-06, 13:09
  3. Symbian OS C++/PJava Socket Connection loss if no network coverage?
    By suppu in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2003-04-02, 18:33

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×