Question

How to check internet availability on mobile application.... in j2me....

Was it helpful?

Solution

Use this property for detect the available GPRS connection on s40 series mobiles.

com.nokia.network.access

Its returns the networking access point type. the possible values for this property are:

* pd — Packet data, for example GPRS
* csd — Circuit-switched data, for example GSM CSD/HSCSD data call
* bt_pan — Bluetooth PAN network
* na — Not applicable, the implementation cannot determine the type r

For more info see this wiki link.

Also you try to access url to verify that. If you got timeout or any connection related exception means the type of network is not available.

OTHER TIPS

There is no standard way in JavaME of doing this. You might want to check custom vendor libraries, e.g. Symbian JavaME libraries.

You can try to ping a server or try to make a connection and catch the exception. But this doesn't give any indication whether the phone is generally capable of connecting to the internet or not. It just tells you, that you can't connect at that moment.

Try just making a connection and see if it throws an exception.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top