1.0.3 • Published 2 years ago

@hexdigital/capacitor-android-battery-settings v1.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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>

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago