J2ME - Detecting HTTP availability

S

Simon

I'm currently writing a client/server J2ME application that uses a HTTP
connection.

It could run in a region where only analog cell service is available.
So, I've implemented a local data store with a synchronization feature
that provides data delta management between client & server. The user
can choose to synchronize later and accumulate data locally.

Is it possible for the J2ME app to reliably detect if HTTP service is
available ? What kind of error do you get when the carrier network
doesn't support that kind of service ?

Thanks,

Simon Paradis
 
D

DigiAl

Simon said:
I'm currently writing a client/server J2ME application that uses a HTTP
connection.

It could run in a region where only analog cell service is available.
So, I've implemented a local data store with a synchronization feature
that provides data delta management between client & server. The user
can choose to synchronize later and accumulate data locally.

Is it possible for the J2ME app to reliably detect if HTTP service is
available ? What kind of error do you get when the carrier network
doesn't support that kind of service ?

Thanks,

Simon Paradis


You may also want to consider the user not allowing your app to communicate
as well.

The open'ing of the connection will fail in your code with a
ConnectionNotFoundException if you are using the Connector.open method.

alan
 
S

Simon

DigiAl said:
You may also want to consider the user not allowing your app to communicate
as well.

The open'ing of the connection will fail in your code with a
ConnectionNotFoundException if you are using the Connector.open method.

alan
Thanks alan.

I do leave the option of not connecting. Connection is only required if
the user wishes to synchronize data (sort of like a delta data
management thing)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,113
Latest member
Vinay KumarNevatia
Top