Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User mrrajesh_1982's Avatar
    Join Date
    Sep 2006
    Posts
    14
    Hello friends I am devloping an client server application using j2me. In my application i need to check the network connection is available(gprs) or not. If the connection is available then i have to send the data to the server. if the gprs connection is not there i have to the data in local database.

    As this is a kind of MobileSurvey applicatin. The user takes the surveys through the mobile and store the answers in the local database(if network connection is not there)or send to server through Http connection.(if network connection is present).

    when the user press the "SUBMIT" button I have to find out whether the Gprs connection is there or not.then i have to decide as acoordingly.


    So friends please help me out how to proceed in this situation?
    Can i check the gprs connectiion is available or not?Is there any built in function is there?

    Please lewt me know???????????

  2. #2
    Nokia Developer Champion hartti's Avatar
    Join Date
    Apr 2003
    Location
    USA, CA
    Posts
    7,192
    First store the data locally and then try to connect to the server. If the connection is not possible, you could catch the exception thrown in a catch clause and keep the data in the local memory.

    Hartti

  3. #3
    Registered User mrrajesh_1982's Avatar
    Join Date
    Sep 2006
    Posts
    14
    Hello Harrti,

    Is there build in function in j2me , which can check the network connection or gprs connection is present or not?if yes please let me inform.
    and will you please give the exact response that that the httpconnection will prodce when i will try to acess the URL in absence of network.

    i am gettingsometimes symbian OS exception for it(i am using 6600).

    Regards Rajesh

  4. #4
    Super Contributor peterblazejewicz's Avatar
    Join Date
    Dec 2005
    Location
    Europe/Poland/Warsaw
    Posts
    1,699
    hi Rajesh,
    please do not cross-post,
    http://discussion.forum.nokia.com/fo...ad.php?t=92793

    just try what Hartti posted, use Connector.open(...) method and catch runtime exception to handle possible lack of networking,
    regards,
    Peter

Similar Threads

  1. GPRS connection status---urgent, please
    By fanyulong in forum Symbian C++
    Replies: 3
    Last Post: 2008-07-15, 07:54
  2. GPRS connection problems on 6600..
    By suckho in forum Symbian Networking & Messaging (Closed)
    Replies: 10
    Last Post: 2005-12-02, 14:00
  3. GPRS connection on the 6230
    By hegi_79 in forum Mobile Java Networking & Messaging & Security
    Replies: 1
    Last Post: 2005-08-11, 15:26
  4. How to initiate a GPRS connection to the mobile phone from a remote server?
    By VigenIssahhanjan in forum Symbian Networking & Messaging (Closed)
    Replies: 2
    Last Post: 2004-11-22, 08:50
  5. long-lived GPRS socket connection
    By drazvan in forum Symbian Networking & Messaging (Closed)
    Replies: 0
    Last Post: 2003-07-31, 23:08

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