×

Discussion Board

Results 1 to 8 of 8
  1. #1
    Regular Contributor
    Join Date
    Nov 2004
    Location
    minsk
    Posts
    432

    Question How to detect an existing active data connection

    Is it possible to check for open connection after installation ? as the connection was opened before my app was installed I cannot rely on rconneciton monitor. So is there any other way to get the connection Id, and other details of an existing active connection
    -J

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

    Re: How to detect an existing active data connection

    Why can not you use RConnectionMonitor ? I would assume GetConnectionCount would give you count, and GetConnectionInfo would give the info with zero based index..

  3. #3
    Regular Contributor
    Join Date
    Nov 2004
    Location
    minsk
    Posts
    432

    Re: How to detect an existing active data connection

    yea you are right .. my mistake ..
    what bout this
    Is it possible to use an open connection to send data instead of opening new one ? , or is it like by default the system uses the existing one always ? in my case i saw the system using the already open one .. Is this a guaranteed behavior

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

    Re: How to detect an existing active data connection

    I would suggest checking SDK docs: http://library.developer.nokia.com/ there appears to be an article called "Attaching to an existing RConnection connection: Tutorial", would think that it might shed some light to your question.

  5. #5
    Regular Contributor
    Join Date
    Nov 2004
    Location
    minsk
    Posts
    432

    Re: How to detect an existing active data connection

    Yea its has some explanation ..
    coming back to my original question .. what I found is that when a connection is open and if i browser uses the same open connection to browse no events are generated !! so rconnectionmonitor cannot give data related to the browsing session alone . it could give info about the long original session not the browsing one .. is there a workaround?

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

    Re: How to detect an existing active data connection

    Quote Originally Posted by julie_777 View Post
    Yea its has some explanation ..
    coming back to my original question .. what I found is that when a connection is open and if i browser uses the same open connection to browse no events are generated !! so rconnectionmonitor cannot give data related to the browsing session alone . it could give info about the long original session not the browsing one .. is there a workaround?
    I do not see the connection on this question to the original one ? nor which part of the original question was not answered, so can you clarify what you want to do, and what have you tried sofar, and what it is that you would want to happen and what is actually happening..

  7. #7
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,673

    Re: How to detect an existing active data connection

    RConnection::EnumerateConnections and RConnection::Attach are methods which you may want to check and locate usage examples for.
    However observing actual traffic (of the browser or anything else) is not part of ready-made API-s.

  8. #8
    Registered User
    Join Date
    Apr 2011
    Posts
    115

    Re: How to detect an existing active data connection

    Look this my code:

    Code:
        RConnection connection;
        RSocketServ socketServ;
        TConnectionInfoBuf connInfo;
    
    
        socketServ.Connect();
        connection.Open(socketServ);
    
        TUint nConnection;
        if(connection.EnumerateConnections(nConnection)!=KErrNone)
        {
            return false;
        }
    
    
    
        for(TInt i=1;i<=nConnection;i++)
        {
    
            if(connection.GetConnectionInfo(i,connInfo)!=KErrNone)
            {
                return false;
            }
            if(connection.Attach(connInfo,RConnection::EAttachTypeNormal)!=KErrNone)
            {
                return false;
            }
    
    
          //here you can read connection information.
    
    
          connection.Close();
    
        }

Similar Threads

  1. How to detect if Mobile Data is Active or not
    By ashraf fawzy in forum Symbian
    Replies: 2
    Last Post: 2012-10-25, 08:17
  2. Replies: 1
    Last Post: 2011-04-26, 06:27
  3. Replies: 0
    Last Post: 2010-07-16, 12:14
  4. Using existing WLAN connection to PC for sending/receiving data
    By KevinBoyd in forum Mobile Java General
    Replies: 5
    Last Post: 2009-12-04, 01:59
  5. Check for active data (GPRS/UMTS) connection
    By cassioli in forum Symbian
    Replies: 0
    Last Post: 2008-06-04, 12:36

Posting Permissions

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