×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280

    Detecting "GPRS on hold"

    OK, I have this problem. I have a MIDlet that needs to poll my server every few seconds. When the phone gets a call the MIDlet is paused, but as soon as I answer the call the MIDlet is restarted. The problem is that during the call, even though the MIDlet is active the GPRS connection it uses for networking is on hold, so after a few seconds, when it tries to poll the server it gets an Exception since it can't get a response.
    Is there anyway to detect that the GPRS connection isn't active (what Exception would be thrown and from what method)? Is there anyway to detect when GPRS becomes available again (after the call is terminated)?

    Thanks in advance,

    shmoove

  2. #2
    Registered User
    Join Date
    Mar 2003
    Location
    Brisbane, Australia
    Posts
    41
    Hi,

    I can't answer your question about detecting when the GPRS session is not active and when it's reactivated. But maybe, what you can do is as soon as you get an exception thrown because the connection can't be made, send the app into a wait state (say, another screen), displaying a message to the user to the effect of "GPRS session appears to be on hold. Press a key when GPRS is active again".

    Hope that helps,

    Gabriel

  3. #3
    Registered User
    Join Date
    Mar 2003
    Location
    Brisbane, Australia
    Posts
    41
    Oops, just noticed how old this thread was ;-) (Came across it doing research on another GPRS problem I'm having and replied without checking the date of the original post properly)

  4. #4
    Regular Contributor
    Join Date
    Oct 2003
    Location
    Portland, OR
    Posts
    152
    shmoove:

    Did you ever find out the answer to your problem? I would be interested to know.

    Mounir

  5. #5
    Super Contributor
    Join Date
    Mar 2003
    Location
    Israel
    Posts
    2,280
    I ended up just Gabriel said. Catching the exception and displaying a message to try again.

    shmoove

Posting Permissions

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