How to programmatically disable the proximity sensor

I am making a screen lock application. In this application, when the user listens to the call, the screen turns off and the screen lock is activated due to the proximity sensor.

I made many attempts with different angles, but could not.

Now I want to disable the proximity sensor using the code in my application.

+5
source share

Source: https://habr.com/ru/post/1238346/


All Articles