Energy Patterns for Mobile Apps

← show all patterns

Open Only When Necessary

Open/start resources/services only when they are strictly necessary.

Context

Some resources require to be manually opened before use. It might be tempting to open necessary resources at the beginning of some task (e.g., upon the creation of an activity). However, resources will be actively waiting for requests, and consequently spending more energy.

Solution

Open resources only when necessary. This also avoids activating resources that will never be used.

Example

In a mobile app for video calls, only start capturing video at the moment that it will be displayed to the user.

References

Occurrences

Android

Issues
Pull Requests
No pull requests.
Commits

iOS

Issues
Pull Requests
Commits