views:

1097

answers:

3

I need to know what internet connection is available when my application is running. I checked out the Reachability example from Apple, but this differs only between wifi and carrier network. What I need to know is what carrier network is selected, UMTS or EDGE or GPRS.

+7  A: 

Currently, this information is not available. If you want this feature, file a new bug and mention that this is a duplicate of bug 6014806.

amrox
+1  A: 

You could take a guess at what kind of network you are on by checking the latency of a round trip to your server. If you are getting figures of under 100ms, you are almost certainly on WiFi.

GPRS and EDGE run at around 600ms latency. UMTS/HSDPA is 100-200ms.

Source: my informal testing, and [AT&T][1] figures.

Airsource Ltd
i think this method is inaccurate. Latency varies a lot, depending the reception of signals.
Shivan Raptor
+1  A: 

Rather than hardcoding different versions of your site for 3G, EDGE, GPRS, wifi broadband, why not build a framework which detects connection speed and bootstraps your site up to the appropriate level of bandwidth? That way you would get appropriate results on slow 3G / wifi, and it would naturally scale to the next generation of wireless broadband (e.g. WiMax and 802.11n) with a minimal amount of effort / disruption.

For example, you could determine different bandwidth "checkpoints" (which may correspond to 3G, EDGE, etc.), then you could do something like transfer some small bit of data or cache a small image (such as an icon) common to all bandwidth levels, benchmark the download speed in the background and set the bandwidth level accordingly.

Wedge