What OS version are you developing for?
If you're using the new OS 5.0, then there is a new API for easily checking (and using) WIFI and other connections.
See the following API:
www . blackberry.com/developers/docs/5.0.0api/net/rim/device/api/wlan/hotspot/package-summary.html |