×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Aug 2012
    Posts
    12

    How to detect the loss of 3G data connection in symbian QT

    Is there a possible way to detect that my phone has lost 3G data connectivity(Not the WIFI) and register some sort of No data event to be scheduled and sent to a distant server.

    I have found the use of MConnectionMonitorObserver (Please refer to the code below) but I don't really know which case should I use to fire the desired event : is it EConnMonStatusUnattached or EConnMonStatusSuspended or EConnMonPacketDataUnavailable ?

    void ConnectionObserver::EventL(const CConnMonEventBase& aEvent )
    {
    switch(aEvent.EventType())
    {
    case EConnMonConnectionStatusChange:
    {
    CConnMonConnectionStatusChange* realEvent;
    realEvent = (CConnMonConnectionStatusChange*) &aEvent;
    TInt connectionStatus = realEvent->ConnectionStatus();

    if (connectionStatus == EConnMonStatusNotAvailable)
    return;

    switch(connectionStatus)
    {
    case EConnMonStatusActive:
    //Connect status is active

    SaveConnectionEvent("Connected");
    break;

    case EConnMonStatusUnattached:
    //Connect status is disconnected

    SaveConnectionEvent("Disconnected");
    break;

    case EConnMonStatusAttached:
    //Connect status is connecting

    SaveConnectionEvent("Connecting");
    break;

    case EConnMonStatusSuspended:
    //Connect status is suspended

    SaveConnectionEvent("Suspended");
    break;
    }
    }
    break;

    case EConnMonPacketDataAvailable:
    {
    SaveConnectionEvent("PDPAvailable");
    }
    break;

    case EConnMonPacketDataUnavailable:
    {
    SaveConnectionEvent("PDPUnavailable");
    }
    break;


    default:
    break;
    }
    }

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: How to detect the loss of 3G data connection in symbian QT

    please do no PM on asking for help on questions, usually it would not help. Anyway, now that I'm here, I could tell that its been long time since I used this API, so would not remember too much of it, and thus would suggest that you debug the API usage and see what kind of values you get in different circumstancies.

  3. #3
    Registered User
    Join Date
    Aug 2012
    Posts
    12

    Re: How to detect the loss of 3G data connection in symbian QT

    I will try to apply your suggestion . Thank you for your answer

Similar Threads

  1. How to detect an existing active data connection
    By julie_777 in forum Symbian
    Replies: 7
    Last Post: 2013-01-17, 11:14
  2. Rms data loss.
    By suraj03 in forum Mobile Java General
    Replies: 8
    Last Post: 2011-07-26, 12:09
  3. AudioInputStream: is there data loss?
    By malemarco in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2007-05-05, 10:42
  4. data loss in bluethooth connection
    By saurbh_g in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2005-04-08, 23:04
  5. 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
  •  
×