Skip to main content

requestAndroidBatteryOptimizationExemption

Opens Android's consent screen for a Doze exemption. This is always explicit opt-in. A false result means the exemption is not active yet; it can also mean the app is not currently foregrounded, the user has already answered, or the prompt was already shown. Recheck isAndroidBatteryOptimizationIgnored after returning to the foreground.

Kind: Function
Package: @ovok/native

Import​

import { requestAndroidBatteryOptimizationExemption } from '@ovok/native/background-sync';

TypeScript signatures​

(): Promise<boolean>

This symbol has no call parameters.

Learn the workflow​

Continue with Background Sync for the workflow context and examples.

Source​

View the declaration in the SDK source.