title: Get bluetooth signal strength
body: <p>I want to get the Bluetooth signal strength of an another device which connected to my phone,</p>
  
  <p><strong>How can I get the Bluetooth signal strength?</strong></p>
  
  <p>I tried to search a lot over google and did not find any answer.</p>
  
  <p>Does someone know how can I implement it?</p>
  
  <p>this is myActivity:</p>
  
  <pre><code>public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
          registerReceiver(receiver, new IntentFilter(BluetoothDevice.ACTION_FOUND));
  
  
      }
  
      @Override
      public boolean onCreateOptionsMenu(Menu menu) {
          // Inflate the menu; this adds items to the action bar if it is present.
          getMenuInflater().inflate(R.menu.main, menu);
          return true;
      }
  
      private final BroadcastReceiver receiver = new BroadcastReceiver(){
          @Override
          public void onReceive(Context context, Intent intent) {
  
              String action = intent.getAction();
              if(BluetoothDevice.ACTION_FOUND.equals(action)) {
                  int rssi = intent.getShortExtra(BluetoothDevice.EXTRA_RSSI,Short.MIN_VALUE);
                  Toast.makeText(getApplicationContext(),"  RSSI: " + rssi + "dBm", Toast.LENGTH_SHORT).show();
              }
          }
      };
  
  }
  </code></pre>
  
  <p>I also has a Bluetooth permission in my manifest file.</p>