Question

I am working with my ipad app. With my iPad 3G,it's a trouble that i can't solve. I want to distinguish between 3G network and wifi in my app. Anyone had encountered the same problem before? any advice welcomed! Thanks!

Was it helpful?

Solution

You want the "reachability" API that is discussed here.

OTHER TIPS

You can use this to distinguish 3G or WIFI network~

//For 3G check
boolean is3g = manager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE)
        .isConnectedOrConnecting();
//For WiFi Check
boolean isWifi = manager.getNetworkInfo(ConnectivityManager.TYPE_WIFI)
        .isConnectedOrConnecting();
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top