Energy Patterns for Mobile Apps

← show all patterns

Race-to-idle

Release resources or services as soon as possible (e.g., wakelocks, screen).

Context

Mobile apps use a number of resources that can be manually closed after use. While active, these resources are ready to respond to requests from the app and require extra power consumption.

Solution

Make sure resources are inactive when they are not necessary by manually closing them.

Example

Implement handlers for events that are fired when the app goes to background, and release wake locks accordingly.

References

Occurrences

Android

Issues
Pull Requests
Commits

iOS

Issues
Pull Requests
Commits