Understand the sensors of smart phone.
This template android code reads RSSI and accelerometer sensors. For the RSSI sensor, press the button to get the wifi link name and the signal strength that the phone has connected to. For the accelerometer, the color of the words will change when the phone is on flat, vertical, top or vertical side.
Note: Enable location permission for the app in your Android device.