title: How to get wifi signal informations : strength, Link speed on android studio?
body: <p>I used the folowing code but i still have problems, it doesn't return any informations :</p>
  
  <pre><code>public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          //initializeWiFiListener();
  
      }
  
      public void initializeWiFiListener() {
  
          String connectivity_context = Context.WIFI_SERVICE;
  
          final WifiManager wifi = (WifiManager) getSystemService(connectivity_context);
  
          if (!wifi.isWifiEnabled()) {
  
              if (wifi.getWifiState() != WifiManager.WIFI_STATE_ENABLING) {
  
                  wifi.setWifiEnabled(true);
              }
          }
  
        registerReceiver(new BroadcastReceiver() {
              public void onReceive(Context context, Intent intent) {
  
                  WifiInfo info = wifi.getConnectionInfo();
                  String ssid = info.getSSID();
                  int rssi = info.getRssi();
                  int speed = info.getLinkSpeed();
                  TextView t1 = (TextView) findViewById(R.id.textView);
                  t1.setText(ssid + " " + Integer.toString(rssi) + " " + Integer.toString(speed));
              }
  
          }, new IntentFilter(WifiManager.RSSI_CHANGED_ACTION));
      }
  
  }
  </code></pre>
  
  <p>there is no informations about my connected wifi.</p>
  
  <p>How to get wifi signal informations : strength, Link speed ?</p>