Socket
Socket
Sign inDemoInstall

react-native-battery-whitelist

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    react-native-battery-whitelist

Check for manufacturer-specific opt-in battery optimization whitelists


Version published
Weekly downloads
2
Maintainers
1
Install size
10.6 kB
Created
Weekly downloads
 

Readme

Source

react-native-battery-whitelist

Checks if any manufacturer-specific opt-in battery optimization whitelist is available for the current Android device. Shows battery saving whitelist screen if this is the case.

Usage

import BatteryWhitelist from "react-native-battery-whitelist";

async function tryStartWhitelist() {
    try {
        const hasIntent = await BatteryWhitelist.hasWhitelistIntent();
        if (hasIntent) await BatteryWhitelist.startWhitelistActivity();
    } catch (error) {
        console.error(error);
    }
}

Credits

Based on https://stackoverflow.com/a/51726040/8116839

Keywords

FAQs

Last updated on 19 May 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc