×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Sep 2013
    Posts
    50

    NetworkManager error dialogs

    I have an app using LWUIT for Series 40.

    I'm using NetworkManager to do some image downloads. When an image no longer exists at the given URL, I get a 403 Forbidden error, which results in an annoying popup dialog message.

    The server error itself is fine...how can I make NetworkManager not do this annoying popup?
    Last edited by james.harpe; 2013-10-01 at 18:29.

  2. #2
    Nokia Developer Moderator
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    28,567

    Re: NetworkManager error dialogs

    Remember that LWUIT is open source.
    A Google search for NetworkManager.java quickly locates the source, and also shows that it is not dealing with HTTP result codes. However after clicking back to the package and checking other files there seem to be a ConnectionRequest.java (https://java.net/projects/lwuit/sour...onRequest.java), which indeed deals with HTTP stuff. After a few page downs there are some checks for HTTP result codes, ending with a call to handleErrorResponseCode, which is located in the same file, and it shows the error message, if no one else handles the error. However you can be that someone else, and set a responseCodeListener (addResponseCodeListener).

  3. #3
    Registered User
    Join Date
    Sep 2013
    Posts
    50

    Re: NetworkManager error dialogs

    Quote Originally Posted by wizard_hu_ View Post
    Remember that LWUIT is open source.
    A Google search for NetworkManager.java quickly locates the source, and also shows that it is not dealing with HTTP result codes. However after clicking back to the package and checking other files there seem to be a ConnectionRequest.java (https://java.net/projects/lwuit/sour...onRequest.java), which indeed deals with HTTP stuff. After a few page downs there are some checks for HTTP result codes, ending with a call to handleErrorResponseCode, which is located in the same file, and it shows the error message, if no one else handles the error. However you can be that someone else, and set a responseCodeListener (addResponseCodeListener).
    Ah, great! Thank you.

  4. #4
    Nokia Developer Champion
    Join Date
    Feb 2008
    Location
    Ahmedabad, Gujarat, India
    Posts
    3,852

    Re: NetworkManager error dialogs

    yes wizard gave you the correct answer but in some of my own applications i actually use my own network manager class , a simple one which performs simple http get and post using HttpConnection class and some more threading stuff.

    The benefit of using such a class is if your operation fails then you have all the control of what to do like showing a default image in your case !!

Similar Threads

  1. Replies: 3
    Last Post: 2010-10-25, 19:20
  2. dialogs
    By atonical in forum Qt
    Replies: 3
    Last Post: 2010-09-12, 11:05
  3. Dialogs
    By abhinay.krs in forum Symbian C++
    Replies: 2
    Last Post: 2009-09-14, 12:11
  4. Is the s60 5th has the dialogs like UIQ?
    By vipoyan@yahoo.com.cn in forum Symbian User Interface
    Replies: 4
    Last Post: 2008-12-23, 10:07
  5. Dialogs
    By Nokia_Archive in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2002-06-05, 06:58

Posting Permissions

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