I created an application which uses camera and during the appplication execution the screen is always on.
In the onCreate() method I added the lock:
I had troubles to release data when I was using OpenGL. So now, with android.os.Process.killProcess(android.os.Process.myPid()); it works just as I want !!
Thanks Art