| Reply | « Previous Thread | Next Thread » |
|
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 |
|
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 |
|
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)
|
|
shmoove:
Did you ever find out the answer to your problem? I would be interested to know. Mounir |
|
I ended up just Gabriel said. Catching the exception and displaying a message to try again.
shmoove |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|