green-code-initiative / ecoCode-android

Reduce the environmental footprint of your Java-based Android apps with SonarQube
https://ecocode.io
GNU General Public License v3.0
54 stars 17 forks source link

[iOS] Power - Save mode awareness (EPOW002) #55

Closed davidy4ng closed 1 year ago

davidy4ng commented 1 year ago

Description

Use device API to check if low power mode is enabled, and adapt resources usage accordingly. For example, you can reduce frequency of data update if low power mode is enabled. Your app can query the ProcessInfo.processInfo.isLowPowerModeEnabled property at any time to determine whether Low Power Mode is active. Your app can also register to receive notifications when the Low Power Mode state of a device changes, using NSProcessInfoPowerStateDidChange.

davidy4ng commented 1 year ago

Implementation of https://github.com/green-code-initiative/ecoCode-mobile/issues/48 Team "-18 jours"

sonarcloud[bot] commented 1 year ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

zippy1978 commented 1 year ago

Close https://github.com/green-code-initiative/ecoCode-mobile/issues/48