Socket
Socket
Sign inDemoInstall

expo-keep-awake

Package Overview
Dependencies
Maintainers
28
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

expo-keep-awake

Provides a React component that prevents the screen sleeping when rendered. It also exposes static methods to control the behavior imperatively.


Version published
Weekly downloads
687K
increased by1.45%
Maintainers
28
Weekly downloads
 
Created

What is expo-keep-awake?

The expo-keep-awake package is used to prevent the screen from sleeping or dimming while your app is in use. This is particularly useful for applications that require constant user interaction or display information that the user needs to see without interruption.

What are expo-keep-awake's main functionalities?

Activate Keep Awake

This feature allows you to activate the keep-awake functionality, preventing the screen from sleeping or dimming.

import { activateKeepAwake } from 'expo-keep-awake';

activateKeepAwake();

Deactivate Keep Awake

This feature allows you to deactivate the keep-awake functionality, allowing the screen to sleep or dim as usual.

import { deactivateKeepAwake } from 'expo-keep-awake';

deactivateKeepAwake();

Use Keep Awake Hook

This feature provides a React hook that you can use within a functional component to keep the screen awake while the component is mounted.

import { useKeepAwake } from 'expo-keep-awake';

function MyComponent() {
  useKeepAwake();
  return <View>{/* Your component code */}</View>;
}

Other packages similar to expo-keep-awake

Keywords

FAQs

Package last updated on 27 Sep 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc