When you talk on the phone in Android the light sensor is working.
If you cover the top left corner of the screen, the display turns black and you can’t see anything.
I would like to cancel that feature and I tried working with Android Sensors and the Light Sensor but it is not working.
This is my code:
senMgrLight=(SensorManager)getSystemService(Context.SENSOR_SERVICE);
senMgrLight.registerListener(onSensorListener,
senMgrLight.getDefaultSensor(Sensor.TYPE_LIGHT),
SensorManager.SENSOR_DELAY_FASTEST);
Thanks.
The sensor you need to work with is the proximity sensor,
try this, this will let you know if the sensor is hidden or not (and it works while your on a call)