ForegroundEnergyManager
ForegroundEnergyManager
ForegroundEnergyManager
ForegroundEnergyManager
Class
Definition
Provides information about your app's foreground energy usage.
public : static class ForegroundEnergyManagerpublic static class ForegroundEnergyManagerPublic Static Class ForegroundEnergyManager// You can use this class in JavaScript.
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Remarks
The energy usage of a foreground app is classified into one these predefined levels, from lowest to highest energy consumption: LowUsageLevel, NearMaxAcceptableUsageLevel, MaxAcceptableUsageLevel, or ExcessiveUsageLevel.
Properties
ExcessiveUsageLevel ExcessiveUsageLevel ExcessiveUsageLevel ExcessiveUsageLevel
Gets the excessive usage level, expressed as a percentage of normal energy usage.
public : static unsigned int ExcessiveUsageLevel { get; }public static uint ExcessiveUsageLevel { get; }Public Static ReadOnly Property ExcessiveUsageLevel As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The excessive usage level, expressed as a percentage of normal energy usage.
Remarks
An app operating at the excessive usage level is at risk of being reported to the Battery Saver app as a high energy consumer.
LowUsageLevel LowUsageLevel LowUsageLevel LowUsageLevel
Gets the low usage level, expressed as a percentage of normal energy consumption.
public : static unsigned int LowUsageLevel { get; }public static uint LowUsageLevel { get; }Public Static ReadOnly Property LowUsageLevel As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The low usage level, expressed as a percentage of normal energy consumption.
Remarks
An app operating at the low usage level is consuming significantly less energy than normal and does not require throttling.
MaxAcceptableUsageLevel MaxAcceptableUsageLevel MaxAcceptableUsageLevel MaxAcceptableUsageLevel
Gets the maximum acceptable usage level, expressed as a percentage of normal energy consumption.
public : static unsigned int MaxAcceptableUsageLevel { get; }public static uint MaxAcceptableUsageLevel { get; }Public Static ReadOnly Property MaxAcceptableUsageLevel As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The maximum acceptable usage level, expressed as a percentage of normal energy consumption.
Remarks
An app operating at or beyond the maximum acceptable level is at risk of being reported to the Battery Saver app as a high energy consumer.
NearMaxAcceptableUsageLevel NearMaxAcceptableUsageLevel NearMaxAcceptableUsageLevel NearMaxAcceptableUsageLevel
Gets the near-maximum acceptable usage level, expressed as a percentage of normal energy usage.
public : static unsigned int NearMaxAcceptableUsageLevel { get; }public static uint NearMaxAcceptableUsageLevel { get; }Public Static ReadOnly Property NearMaxAcceptableUsageLevel As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The near-maximum acceptable usage level, expressed as a percentage of normal energy usage.
Remarks
An app operating at this level is getting close to the maximum acceptable level.
RecentEnergyUsage RecentEnergyUsage RecentEnergyUsage RecentEnergyUsage
Gets the nearest predefined energy level of the foreground app for the current 30 minute period, equal to LowUsageLevel, NearMaxAcceptableUsageLevel, MaxAcceptableUsageLevel, or ExcessiveUsageLevel.
public : static unsigned int RecentEnergyUsage { get; }public static uint RecentEnergyUsage { get; }Public Static ReadOnly Property RecentEnergyUsage As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The nearest predefined energy level of the foreground app for the current 30 minute period.
Remarks
The RecentEnergyUsage property is a more accurate measure of energy usage than RecentEnergyUsageLevel. The RecentEnergyUsage value will typically fall between predefined energy levels. The RecentEnergyUsageLevel will always equal the nearest predefined energy level.
RecentEnergyUsageLevel RecentEnergyUsageLevel RecentEnergyUsageLevel RecentEnergyUsageLevel
Gets the nearest predefined energy level of the foreground app for the current 30 minute period, equal to LowUsageLevel, NearMaxAcceptableUsageLevel, MaxAcceptableUsageLevel, or ExcessiveUsageLevel.
public : static unsigned int RecentEnergyUsageLevel { get; }public static uint RecentEnergyUsageLevel { get; }Public Static ReadOnly Property RecentEnergyUsageLevel As uint// You can use this property in JavaScript.
- Value
- unsigned int uint uint uint
The nearest predefined energy level of the foreground app for the current 30 minute period.
Events
RecentEnergyUsageIncreased RecentEnergyUsageIncreased RecentEnergyUsageIncreased RecentEnergyUsageIncreased
Occurs when the app's foreground energy usage has increased significantly.
public : static event EventHandler RecentEnergyUsageIncreased<object>public static event EventHandler RecentEnergyUsageIncreased<object>Public Static Event RecentEnergyUsageIncreased<object>// You can use this event in JavaScript.
Remarks
Notifications are sent at each significant increase up to the termination usage level.
RecentEnergyUsageReturnedToLow RecentEnergyUsageReturnedToLow RecentEnergyUsageReturnedToLow RecentEnergyUsageReturnedToLow
Occurs when the app's energy usage has decreased to a low usage level.
public : static event EventHandler RecentEnergyUsageReturnedToLow<object>public static event EventHandler RecentEnergyUsageReturnedToLow<object>Public Static Event RecentEnergyUsageReturnedToLow<object>// You can use this event in JavaScript.
Remarks
An app operating at this level is consuming significantly less energy than normal and does not require throttling.