In my app there is a long loading process, and if the devices puts on the screen lock, my process stops for some reason.
How can i prevent the device from automatic screen lock?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
you have to declare this uses-permission on AndroidManifest:
And in your code Activity:
Just remember to release this lock when your application is paused or destroyed by doing this:
Usually, it’s suggested to call the acquire method inside the onResume() of your activity and the release method in onPause(). This way we guarantee that our application still performs well in the case of being paused or resumed.