Discussion Board

Results 1 to 4 of 4
  1. #1
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Hi Guyes..

    I am very much surprising that my application is making http connection with server for the all devices like n 95, n 70 , 3230 3250 except N 72.

    I dont know why it is happening that n 72 is not able to open the connection.I have also check for the same SIM on other phones.....


    please if any one have any ideas..then plz let me know....


    Thanks in advance..
    RAJ
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  2. #2
    Nokia Developer Champion jappit's Avatar
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,391
    What does happen when trying to open connection on N72? Does it hang or throw an Exception?

    Can you post the code line (or portion) giving you this problem?

    Pit

  3. #3
    Nokia Developer Champion raj_J2ME's Avatar
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,314
    Thnxs for the reply..
    Actually it doing is just continuously showing the connecting screen.And i dont know whether it is getting the res code = 200 on phone..its like hang in connecting screen.And not finishing this ..
    on any other devices its working ...

    here it is the code..

    try
    {
    hc = (HttpConnection) Connector.open (url);
    respCode = hc.getResponseCode ();
    if( respCode != hc.HTTP_OK)
    {


    }
    dis = hc.openInputStream ();
    String type = hc.getType ();
    len = (int)hc.getLength ();

    if (len!=-1)
    {
    for (int i = 0; i < len; i++)
    {
    if ((ch = dis.read ()) != -1)
    {
    if (ch <= ' ')
    {
    ch = ' ';
    }
    b.append ((char) ch);
    }
    }
    message = b.toString ();
    }
    else
    {
    byte data[] = new byte[len];
    int n = dis.read (data, 0, data.length);
    for (int i = 0; i < n; i++)
    {
    ch = data[i] & 0x000000ff;
    b.append ((char)ch);
    }
    message = b.toString ();
    }



    if(mySMSCanvas.transectionDone)
    {
    parseXMLForMsgType2 ( );
    }
    else
    {
    } parseXMLForMsgType1 ( );
    }
    catch(Exception e)
    {
    System.out.println ("Error while parsing RSS data: "+ e.toString ());
    }
    finally
    {
    try
    {
    if (hc != null) hc.close ();
    if (dis != null) dis.close ();
    }
    catch(Exception e)
    {
    System.out.println ("The Error in Finally Method is ="+e);
    }
    }

    reply ASAP
    Thxns RAJ
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Nokia Developer Champion jappit's Avatar
    Join Date
    Nov 2007
    Location
    Rome, Italy
    Posts
    2,391
    Can you log server side to check if connection is effectively done?

    Other thing: on same N72 can you successfully connect using other apps (like Browser)?

    Pit

Similar Threads

  1. How to cancel a http connection mid-way
    By capricious28 in forum Mobile Java General
    Replies: 0
    Last Post: 2007-08-10, 10:42
  2. Close HTTp Connection in N6230i
    By cars2004 in forum Mobile Java General
    Replies: 1
    Last Post: 2005-06-24, 10:46
  3. Close HTTp Connection in N6230i
    By cars2004 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2005-06-24, 09:29
  4. Related to http connection...very urgent
    By srideviv in forum Mobile Java Networking & Messaging & Security
    Replies: 4
    Last Post: 2004-02-09, 13:44
  5. Nokia and Vodafon Italy --> No http connection
    By javame in forum Mobile Java General
    Replies: 0
    Last Post: 2002-11-28, 13:57

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved