1

I have questions about programming in BlackBerry Devices OS 5 - 7. Is there a listener that can listen if the device is just connected to internet connection? The task of my app is that if the device is connected, it will send a http request right away.

Looking forward to it.

Best regards,

Hammy

Hammy Lin
  • 37
  • 1
  • 6
  • 2
    Refer http://stackoverflow.com/questions/11670956/how-to-check-availability-of-internet-connectionwifi-gprs-edge-in-blackberry , http://stackoverflow.com/questions/7857838/how-to-check-for-an-active-internet-connection-in-blackberry-sdk and http://stackoverflow.com/questions/7539044/how-to-check-internet-connection-in-java-in-blackberry – Rince Thomas Oct 15 '13 at 02:50

1 Answers1

1

The listener you want is called CoverageStatusListener. Have a look at the API: CoverageStatusListener and CoverageStatusListener OS6.0+. Note the two flavours - you might want to use the extended version in your OS 6 and above apps.

But that said, coverage is only 1/2 the story. You might have good coverage but no access to the specific web site you are targeting. Another common problem is things like WiFi Hotspots - you can be talking quite happily on WiFi, but unless you have signed in to the Hotspot, you are not going to be able to communicate with your web site. So the many links that have already been provided by Signare (in the comments for your question), are useful. Here they are again, plus one more that I think is useful:

how-to-check-availability-of-internet-connectionwifi-gprs-edge-in-blackberry

how-to-check-for-an-active-internet-connection-in-blackberry-sdk

how-to-check-internet-connection-in-java-in-blackberry

how-to-check-network-connection-type-in-blackberry

Community
  • 1
  • 1
Peter Strange
  • 2,640
  • 11
  • 11