title: How to get the internet speed in android
body: <p>Help me to find the internet speed in android. I went through many questions which are asked in stack overflow. But I didn't get proper solution to my question. Below code will be used to check the wifi speed.</p>
  
  <pre><code>WifiManager wifiManager = (WifiManager) mContext.getSystemService(Context.WIFI_SERVICE);
  WifiInfo wifiInfo = wifiManager.getConnectionInfo();
  currentNetworkSpeed = wifiInfo.getLinkSpeed()
  return currentNetworkSpeed;
  </code></pre>
  
  <p>But I want to get the speed of internet in my phone might be 3G/2G/4G. And the questions that were answered are 2 to 5 years back. is there any new technique to find the speed of internet? </p>