Skip to content

bkervaski/capacitor-android-battery-settings

 
 

Repository files navigation

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>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 43.1%
  • Java 33.3%
  • TypeScript 12.1%
  • HTML 11.1%
  • CSS 0.4%