Does anyone know what code to use (MIDP 1.0 preferably) to check for internet connectivity on a Nokia or Sony Ericsson phone before trying make an HTTP connection?
When I use the following code, an exception is never thrown when I have my handset's internet connection turned off:
Try to request the result code or to open the input stream. From my experience the phone does not try to establish connection before you call getResponseCode or getInputStream.
Think of how dumb the average person is. Mathematically, half of them are EVEN DUMBER. Smart tiny ad: