Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2005

    Nokia 6020 Http connection in a Midlet

    I have been developing a j2me application, and we need to test it on the Nokia 6020.
    This application requires the midlet to make a connection to the internet.

    The phone its self can connect to the internet fine, through the built in browser, but not throught the midlet.

    I have pushed the GPRS settings from the nokia website to the phone and that did not work.

    We are using both an AT&T Sim card, and a T-Mobile Sim card.

    My coworkers and I have discussed this problem and we have come to 2 possible conclusions.

    1) A midlet needs to be signed to establish an http connection on this phone
    We had heard rumors that maybe this was the case on some early MIDP 2.0 Phones.


    2) We have not setup the phone correctly for an http connection through a midlet.
    If so could you tell us the proper steps to setup such a connection on either the
    T-Mobile network, or the AT&T/Cingular network.

    I would appreciate a response to this email at your earliest convenience.

    Thank you


  2. #2
    Registered User
    Join Date
    May 2005
    Cape Town, SA

    Re: Nokia 6020 Http connection in a Midlet


    Are you using the correct methods and sequence to connect to the net?
    Below is sample code from "Network Programming with J2ME devices" by Feng Yu posted on the Wireless Developer Network site.

    The other sample code from this same excerpt is also quite informative.

    HttpConnection hc = (HttpConnection);
    InputStream is = new hc.openInputStream();

    int ch;
    // Check the Content-Length first
    long len = hc.getLength();
    if(len!=-1) {
    for(int i = 0;i<len;i++)
    if((ch = is.read())!= -1)
    System.out.print((char) ch));
    } else {
    // if the content-length is not available
    while ((ch = is.read()) != -1)
    System.out.print((char) ch));


Similar Threads

  1. Http Connection In Nokia 7650
    By shiran4 in forum Mobile Java General
    Replies: 0
    Last Post: 2004-01-14, 09:56
  2. Nokia Mobile VPN Client
    By marcyl in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2003-12-01, 14:47
  3. Replies: 0
    Last Post: 2002-11-03, 23:22
  4. Replies: 0
    Last Post: 2002-09-19, 11:45

Posting Permissions

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