Share via


Permissions.Battery Class

Definition

Represents permission to access the device battery information.

public: ref class Permissions::Battery : Microsoft::Maui::ApplicationModel::Permissions::BasePlatformPermission
public class Permissions.Battery : Microsoft.Maui.ApplicationModel.Permissions.BasePlatformPermission
type Permissions.Battery = class
    inherit Permissions.BasePlatformPermission
Public Class Permissions.Battery
Inherits Permissions.BasePlatformPermission
Inheritance

Remarks

Platform specific remarks:

- Android: Battery_Stats permission must be set in manifest.

- iOS: Simulator will not return battery information, must be run on device

- UWP: None

Constructors

Permissions.Battery()

Methods

CheckStatusAsync()

Retrieves the current status of this permission.

(Inherited from Permissions.BasePlatformPermission)
EnsureDeclared()

Ensures that a required entry matching this permission is found in the application manifest file.

(Inherited from Permissions.BasePlatformPermission)
RequestAsync()

Requests this permission from the user for this application.

(Inherited from Permissions.BasePlatformPermission)
ShouldShowRationale()

Determines if an educational UI should be displayed explaining to the user how this permission will be used in the application.

(Inherited from Permissions.BasePlatformPermission)

Applies to