Is there any API that I can distinguish between a 3G network and Wi-Fi?

I am working with my ipad application. With my iPad 3G, this is a problem that I cannot solve. I want to distinguish between 3G network and Wi-Fi in my application. Has anyone encountered the same problem before? Any advice is welcome! Thank!

+5
source share
3 answers

You want to API reachability , which was discussed here .

+3
source

, 3G WIFI ~

//For 3G check
boolean is3g = manager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE)
        .isConnectedOrConnecting();
//For WiFi Check
boolean isWifi = manager.getNetworkInfo(ConnectivityManager.TYPE_WIFI)
        .isConnectedOrConnecting();
-4

All Articles