How to turn screen off or send device to sleep
问题 I want to send device to sleep or turn the screen off. I have investigated and found this topic: Turn off screen on Android Basically, the are three ways to do it, but I have found problems for the three: a) Choice 1: PowerManager manager = (PowerManager) getSystemService(Context.POWER_SERVICE); manager.goToSleep(int amountOfTime); Problem: It causes FC. I have read I need DEVICE_POWER permissions, but it can't be granted for normal apps. b) Choice 2: PowerManager manager = (PowerManager)