Android examples for android.net.wifi:Wifi Property
get WiFi Link Speed
import android.annotation.SuppressLint; import android.content.Context; import android.net.wifi.WifiInfo; import android.net.wifi.WifiManager; public class Main { @SuppressLint("ServiceCast") public static long getWiFiLinkSpeed(Context context) { WifiManager wifi_service = (WifiManager) context.getSystemService(context.WIFI_SERVICE); WifiInfo wifiInfo = wifi_service.getConnectionInfo(); wifiInfo.getLinkSpeed();//from ww w. j a v a2 s .c o m return wifiInfo.getLinkSpeed(); } }