title: View Sensor list on android device
body: <p>I am a new to Android development and I would like to create an application which shows the list of sensors on my Android device.</p>
  
  <p>I tried to find this but without the success.</p>
  
  <p>Can you please help me.</p>
  
  <p>Here is the solution how to do this:</p>
  
  <pre><code>///////////////  List of Sensors  //////////////////////////////
  listeCapteurs = (ListView) findViewById(R.id.ListView01);
  
  SensorManager sensorManager=
  (SensorManager)getSystemService(Context.SENSOR_SERVICE);
  List&lt;Sensor&gt; listSensor=
  sensorManager.getSensorList(Sensor.TYPE_ALL);
  
  List&lt;String&gt; listSensorType = new ArrayList&lt;String&gt;();
  
  for(int i=0; i&lt;listSensor.size(); i++)
  {
  listSensorType.add(listSensor.get(listSensor.size()-1-i).getName());
  }
  </code></pre>