Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

expo-keep-awake

Package Overview
Dependencies
Maintainers
28
Versions
92
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.

  • 14.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
782K
decreased by-7.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 22 Oct 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