All Android smartphones come with a few sensors. Even the cheapest of the smartphones come with at least a light sensor. The expensive phones come with all the sensors namely accelerometer, light sensor, proximity sensor, magnetometer, compass, gyroscope, gravity sensor, barometer etc.
Usually, you can read the manual that came with your Android smartphone to find out everything about all the sensors that are available in your phone. But if you cannot find any such information in the manual, even then you can sue an app like “Sensor Test” to find all the sensors available on your Android device.
Sensor Test not only finds and lists all the sensors available on your Android device, it also tests them and shows you their status. When launched, Sensor Test displays a list of all the sensors. The sensors that are displayed with a green dot are available on your device and are working properly.
The sensors that are displayed in the list with a red dot are either not available or they are not working as expected. In either case, they are not available to the user. But you can further confirm this by tapping on the Test button. If a sensor is not available then the test will complain of not getting any data.
The tests for each of these detected sensors are different and depend on the sensor type. For example, in the case of the light sensor it shows the amount of the light in the lux units. In case of the accelerometer, it displays a football field and allows you to roll the ball from one side to another. For magnetometer, it displays the magnetic field measured in terms of Tesla. For the compass, it displays an actual compass that rotates and aligns to the magnetic axis of Earth.
You can get the Sensor Test app for Android from https://play.google.com/store/apps/details?id=ru.andr7e.sensortest.