Skip to main content

Overview

Opens the system battery optimization settings list where users can manually toggle battery optimization for specific apps. This is a safer alternative to requestBatteryOptimizationExemption() as it doesn’t require special permissions.

Returns

success
boolean
Promise resolving to true if settings were successfully opened, false otherwise.

Platform Behavior

Advantages Over Direct Request

When to Use

Use this method when:
  • You want to avoid Google Play policy concerns
  • Your app doesn’t strictly require background execution
  • You prefer a more conservative approach
  • You want to let users control the setting manually
Consider requestBatteryOptimizationExemption() when:
  • Your app genuinely requires background execution
  • You meet Google Play’s acceptable use cases
  • You want a simpler user experience

Example Usage

Basic Usage

With User Guidance

Settings Screen

Onboarding Flow

Check and Guide

With Fallback

User Instructions by Manufacturer

Different manufacturers have slightly different UIs:

Stock Android / Google Pixel

  1. Find your app in the list
  2. Tap on it
  3. Select “Don’t optimize”

Samsung

  1. Find your app
  2. Tap it
  3. Select “Don’t optimize”

Xiaomi (MIUI)