title: Android Network Provider RSSI: displaying the dBm in textview
body: <p>I'm trying to display the dBm just as you can see it under:</p>
  
  <blockquote>
    <p>Settings>About Phone>Status ..</p>
  </blockquote>
  
  <p>so far I have gotten to the point of the app not crashing on me. </p>
  
  <p>It now, just doesn't display anything in the textview. </p>
  
  <p>I've looked at a lot of post's on here and each one, is something different then what I am looking for. Thought it would be a simple search and find, turns out that its not. </p>
  
  <p>Not sure what I'm doing wrong here, no errors in LogCat anyone has any ideas that would be awesome. </p>
  
  <p>the developer references don't help me at all, unless it has something showing me how it is use/working so I can understand it. I've tried and failed lol, anyway heres my code:</p>
  
  <pre><code>import java.util.List;
  
  import android.app.Activity;
  import android.content.Context;
  import android.os.Bundle;
  import android.telephony.NeighboringCellInfo;
  import android.telephony.TelephonyManager;
  import android.widget.TextView;
  
  public class Screen extends Activity {
  
      TextView dbm;
      String dBm;
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.mainfull);
          dbm = (TextView) findViewById(R.id.Signal);
  
          TelephonyManager telephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
  
          List&lt;NeighboringCellInfo&gt; NeighboringList = telephonyManager
                  .getNeighboringCellInfo();
  
          for (int i = 0; i &lt; NeighboringList.size(); i++) {
  
              int rssi = NeighboringList.get(i).getRssi();
  
              if (rssi == NeighboringCellInfo.UNKNOWN_RSSI) {
                  dBm = "Unknown RSSI";
              } else {
                  dBm = String.valueOf(-113 + 2 * rssi) + " dBm";
              }
  
          }
  
          dbm.setText(dBm);
  
      }
  }
  </code></pre>
  
  <p>not sure if I'm missing any info that might be helpful, if so let me know</p>