How to prevent app from closing when android device goes to sleep
问题 How do i prevent my app from closing when the device goes to sleep mode, i obsevered that anytime my device goes to sleep mode my app closes but i want it still open when my devices comes out of sleep mode. 回答1: Probably it is because you call the finish() method in the onPause(). 来源: https://stackoverflow.com/questions/28811831/how-to-prevent-app-from-closing-when-android-device-goes-to-sleep