When it's necessary, you can use wake locks to keep the device from going to sleep.
Under some circumstances, you may need to keep the device awake even when your app is in the background. To do this, you can create a wake lock.
Your feedback is a crucial part of improving our documentation. Please give us your feedback using the following link:
This guide explains the following areas:
- Set a wake lock
- Release a wake lock
- Follow wake lock best practices
- Debug wake locks locally
- Identify wake locks created by other APIs
This guide assumes you're familiar with the following topics: