I'm using this code to enter in PARTIAL_WAKE_LOCK mode:
PowerManager pm = PowerManager.getSystemService(Context.POWER_SERVICE);
screenWakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK,
"screenWakeLock");
pm.acquire();
but I do not succeed to switch off the screen and switch on when I need it,I read tens of examples without succeed in it.
I can't use code that require the permission DEVICE_POWER like goToSleep() and wakeUp().
My goal is switch on the screen for 1 second and to switch off it for 10 seconds, and then start again.
Thanks all.