×

Discussion Board

Results 1 to 11 of 11
  1. #1
    Registered User
    Join Date
    Jul 2008
    Posts
    27

    S60 problem for contents from internet

    Hi all,
    I built an application that connects to internet and serves contents on mobile, it makes several ping to server and stores data in rms then shows each record on request

    It is working fine on nokia 6300 which is S40 handset but when i put it on nokia 6120 Classic,

    I faced issue in first and last requests which did not appear, is there any difference for http connection behavior or rms between s40 and s60 or there is an other issue

    any suggestions...

    thanks in advance.

    Regards,
    Kashif Nawaz

  2. #2
    Registered User
    Join Date
    Sep 2007
    Location
    Bangalore
    Posts
    868

    Re: S60 problem for contents from internet

    Hi ,

    Did you get any exception for fist and last request in 6210, How did you come to know it is failing for fist and last request?

  3. #3
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: S60 problem for contents from internet

    Hi,
    I guess that there should not be any problem while opening the HTTP connection as far the S40 and S60 are concern.What exactly the exception you are getting.
    @ Can you put the exception type here??
    @ Are the type of exception on the first and last request same or diff.??
    @ Please debug the code in order to get the exact location of the error in the code in order to get the quick solution.

    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  4. #4
    Registered User
    Join Date
    Jul 2008
    Posts
    27

    Re: S60 problem for contents from internet

    i got the exception printed on screen, it is java.lang.ArrayIndexOutOfBound Exception

    and it is coming on first and last request as i can see because rest are being processed with no problem.

    and by the way i also have S40 device i.e. Nokia 6300, there I got no issue

  5. #5
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: S60 problem for contents from internet

    Hi Kashif,
    Please also tell me that what exactly the location of the problem is...it can be -
    @ While Making The connection..Less chances...
    @ While saving the data in RMS..Most chances
    @ due to other reason..more chances

    Put the respective code here,
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  6. #6
    Registered User
    Join Date
    Jul 2008
    Posts
    27

    Thumbs up Re: S60 problem for contents from internet

    well, i got it fixed, however lemme explain the scenario...

    I made http connection
    built input stream from that connection
    measured number of bytes available in that stream...
    read those amount of bytes and saved in array...
    there is also a reference to last few bytes in the expected data say it is 1456th index

    now, behavior of input stream showed 1135 bytes avaiable

    so i had to make it available how many total bytes would there be for http response, not currently available in input stream

    Now I am confused about such behavior of devices, whats reason for this issue, I am not surely confirm

    any idea from there please share over here. It is again an interesting thing that i'll be putting on my experience to j2me development at
    http://kashifnawaz.wordpress.com/j2me/

  7. #7
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: S60 problem for contents from internet

    Hi,
    I guess the data inside the stream is of last request..right,
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  8. #8
    Registered User
    Join Date
    Jul 2008
    Posts
    27

    Wink Re: S60 problem for contents from internet

    some how it is either data comes in stream in the form of small chunks or it is as you said that of last request and system reaches before it is refreshed.... i tried to find it out but still not not confirmed about its exact reason...i think better way to confirm it is to compare behavior of a couple of consecutive requests...

    Regards,
    Kashif Nawaz

  9. #9
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: S60 problem for contents from internet

    Hi,
    An idea .....just make the stream as null after completion of every request.And while coming for the next one...just let this remains empty..then put the data ..
    Its a good idea to make the connection,all the streams,and all as null after the completion of the request..however be careful of the nullpointer exception..
    Thanks,
    Last edited by raj_J2ME; 2008-11-14 at 03:58.
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

  10. #10
    Registered User
    Join Date
    Jul 2008
    Posts
    27

    Smile Re: S60 problem for contents from internet

    great idea, but in this way we are to carefully handle null pointer exception of java that may come any time. so you better edit your quote to bother this exception as well.

    Regards,
    Kashif Nawaz

  11. #11
    Super Contributor
    Join Date
    Mar 2008
    Location
    The Capital of INDIA
    Posts
    4,328

    Thumbs up Re: S60 problem for contents from internet

    Hi,
    As you stated, and I have also told that when you are coming for the next time then initialize the connection, streams and all,

    Thanks kashif for the same..
    Thanks,
    Thanks with Regards,

    R a j - The K e r n e l


    Join Delhi-NCR Nokia Developer's Community,

Similar Threads

  1. Simple problem about S60 3rd
    By Aspen in forum Symbian
    Replies: 9
    Last Post: 2007-04-13, 10:52
  2. S60 3rd MR1 porting, BAFL 4, resource problem?
    By danielos1 in forum Symbian Tools & SDKs
    Replies: 0
    Last Post: 2007-03-19, 15:10
  3. Problem: S60 SDK for CW in PC with .NET
    By anttij in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 1
    Last Post: 2005-02-28, 11:36
  4. Serious problem with Strinng on S60 with midp 1.0
    By kavaja in forum Mobile Java General
    Replies: 1
    Last Post: 2005-02-01, 09:20
  5. Internet : Memory Problem
    By raj_vijayarajan in forum Symbian
    Replies: 0
    Last Post: 1970-01-01, 02:00

Posting Permissions

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