title: Detect and handle slow internet connection in android studio
body: <p>Anyone here have the sample code on how to detect and handle slow internet connection?</p>
  
  <p>For now I can detect whether internet connection is available or not using the codes below:</p>
  
  <pre><code>ConnectivityManager cm = (ConnectivityManager)getActivity().getSystemService(Context.CONNECTIVITY_SERVICE);
  NetworkInfo activeNetwork = cm.getActiveNetworkInfo();
  boolean isConnected = activeNetwork != null &amp;&amp; activeNetwork.isConnectedOrConnecting();
  
          if (isConnected){
  
          } else{
  
                }
  </code></pre>
  
  <p>So, is there any method or way to detect slow internet connection?</p>