Overview
Opens OEM-specific battery or background settings if available for the current device. Many Android manufacturers implement aggressive battery optimization features that can kill apps even when standard Android battery optimizations are disabled.Returns
Promise resolving to
true if OEM settings were successfully opened, false if the device doesn’t have recognized OEM settings or if opening failed.Platform Behavior
Why OEM Settings Matter
Standard Android battery optimization APIs are often insufficient. Many manufacturers add their own aggressive power management: ❌ Problem: Even with battery optimization disabled viaisIgnoringBatteryOptimizations(), manufacturers’ custom systems may still kill your app.
✅ Solution: Guide users to whitelist your app in the manufacturer’s settings.
Supported Manufacturers
This method recognizes and attempts to open settings for:- Xiaomi (MIUI) - Autostart and battery settings
- Samsung (OneUI) - Battery and app management
- Huawei (EMUI) - App launch and protected apps
- Honor - Startup manager
- OnePlus (OxygenOS) - Chain launch management
- Oppo (ColorOS) - Startup app list
- Vivo (FuntouchOS) - Background startup manager
- Realme (based on ColorOS) - Startup settings
- Asus (ZenUI) - Autostart management
- Lenovo - Background management
- Meizu (Flyme) - Power permissions
- Nokia (HMD Global) - Power saver exceptions
Example Usage
Basic Usage
Check Manufacturer First
Manufacturer-Specific Instructions
Onboarding Flow
Troubleshooting Screen
Complete Setup Helper
With Fallback
Implementation Details
The method:- Detects manufacturer using
Build.MANUFACTURER - Tries multiple known component intents for that manufacturer
- Falls back to standard battery optimization settings
- Falls back to app details settings
- Returns
falseif nothing could be opened
Testing
Since OEM settings vary by manufacturer:Related APIs
getDeviceManufacturer()- Get manufacturer nameopenBatteryOptimizationSettings()- Standard Android settingsisIgnoringBatteryOptimizations()- Check standard battery optimization

