Open Derkades opened 5 years ago
This seems like a duplicate of #105
Detecting movement of the device is not the same as detecting something coming close to the proximity sensor
I think it actually is, the way that I understand it, the feature you are describing works based on the devices accelerometer or gyroscope detecting certain movements. So the device knows that it is in the vertical position (next to your ear). Waking the screen on motion is already something we have built in, as well as waking the device by detecting faces. Some phones do have a proximity device, but not many. I am putting these tickets together because they are all device sensor related.
Almost all phones have proximity sensors.
In some phones it is nearly invisible unless you shine a bright light at it, for example on my oneplus 2 the proximity sensor to the left of the front facing camera is almost invisible.
You are missing the point. Using a proximity sensor is very useful in wall mounted situations. To solve the problem, I used a third party app that wakes the screen so I can move my hand to close to the screen to turn it on. Waving your hand at the proximity sensor is faster than trying to click the on button. It is like using the camera to detect a person coming close, but without having to do complex image recognition.
If someone is interested in implementing this feature, they are welcome to do a PR request. I have labeled this as help wanted for those who want to contribute.
I am with you, sounds like a good feature to have. I am leaving this request open hoping someone decides to help on this feature.
I could take a look, it's an excuse to start learning android app development so that's good I suppose
I have some sensor code in the application already, it gets a list of supported sensors and reports them over MQTT. So that is the start, detecting if the device has the proximity sensor, then the next step is to detect a change in that sensor to wake the device.
Pretty much all phones have a front facing proximity sensor, for sensing when someone is holding the phone against their ear when calling so the phone can disable the screen. My request is to add an option to wake the screen when a change in proximity is measured. This would allow you to wake the screen by moving your hand in front of it.
If I recall correctly, while the sensors reports data as a distance (e.g. 5.0cm), usually the sensors can only read two or a few more values. For example, it might say "0.0 cm" or "5.0 cm" but no other values.