getPowerManagerInfo

Android Only

API used to get information about the device and its power manager settings, including manufacturer, model, version and activity.



getPowerManagerInfo(): Promise<PowerManagerInfo>;

If activity is null, openPowerManagerSettings() will be noop.

On iOS, an instance of PowerManagerInfo will be returned with activity set to null.

View the Background Restrictions documentation for more information.

import notifee from `@notifee/react-native`;

const powerManagerInfo = await notifee.getPowerManagerInfo();

if (powerManagerInfo.activity) {
 // 1. ask the user to adjust their Power Manager settings
 // ...

 // 2. open settings
 await notifee.openPowerManagerSettings();
}


Copyright 2020 - 2021 © Invertase Limited

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 3.0 License and code samples are licensed under the Apache 2.0 License.

All product names, logos, and brands are property of their respective owners. All company, product and service names used in this website are for identification purposes only. Use of these names, logos, and brands does not imply endorsement.