How to use the expo-keep-awake.activateKeepAwake function in expo-keep-awake

To help you get started, we’ve selected a few expo-keep-awake examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github sysgears / larix / packages / create / templates / mobile-rest / src / AwakeInDevApp.tsx View on Github external
public _activate() {
    if (process.env.NODE_ENV === 'development') {
      activateKeepAwake();
    }
  }

expo-keep-awake

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

MIT
Latest version published 4 months ago

Package Health Score

91 / 100
Full package analysis