public interface IPowerInfoBattery, charging and thermal state.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
Present so that quality scaling on mobile has something to scale on (docs/plan/10 § iOS). A renderer that drops shadow resolution when Thermal reaches Serious keeps a stable frame rate; one that waits to notice frame times rise has already given the player a stutter.
Everything is optional. A desktop with no battery reports Mains and no level, and a headless server reports nothing at all — which is why the numeric properties are nullable rather than sentinel-valued.
Fields and properties (5)
PowerSource SourceWhere power is coming from.
float? BatteryLevelHow full the battery is, [0, 1], or if there is no battery or the platform will not say.
TimeSpan? EstimatedTimeRemainingHow long the platform thinks the battery will last, or if it does not estimate.
ThermalState ThermalHow hot the device is.
bool IsLowPowerModeWhether the user has asked the OS to save power.
Used by (14)
- DesktopPlatformVixen.Platform.Desktop
- DesktopPlatformTestsVixen.Platform.Desktop.Tests
- DesktopPowerInfoVixen.Platform.Desktop
- HeadlessLifecycleTestsVixen.Platform.Headless.Tests
- HeadlessPlatformVixen.Platform.Headless
- HeadlessPowerInfoVixen.Platform.Headless
- IPlatformVixen.Platform
- LinuxPowerInfoVixen.Platform.Linux
- MacOSPowerInfoVixen.Platform.MacOS
- NothingPowerInfoVixen.Platform.Desktop.Tests
- NothingPowerInfoVixen.Platform.MacOS.Tests
- PlatformServicesVixen.Platform
- RecordingSupplementVixen.Platform.Desktop.Tests
- WindowsPowerInfoVixen.Platform.Windows