@hexdigital/capacitor-android-battery-settings
TypeScript icon, indicating that this package has built-in type declarations

1.0.3 • Public • Published

capacitor-android-battery-settings

Configure Android battery optimisation settings

Install

npm install capacitor-android-battery-settings
npx cap sync

Add the following to your AndroidManifest.xml above the <application> tag.

<uses-permission android:name="android.permission.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS" />

API

isBatteryOptimizationEnabled()

isBatteryOptimizationEnabled() => Promise<{ isUnrestricted: boolean; }>

Returns: Promise<{ isUnrestricted: boolean; }>


requestBatteryOptimizationDisabled()

requestBatteryOptimizationDisabled() => Promise<void>

Dependents (0)

Package Sidebar

Install

npm i @hexdigital/capacitor-android-battery-settings

Weekly Downloads

1

Version

1.0.3

License

MIT

Unpacked Size

16.1 kB

Total Files

21

Last publish

Collaborators

  • giuseppe-hex
  • jonathanhipkiss
  • nnomadic
  • hex-dev
  • jamiewarb