Skip to content

😪 NativeScript plugin to keep the device awake (not dim the screen, lock, etc)

Notifications You must be signed in to change notification settings

GustavoEdinger/nativescript-insomnia

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NativeScript Insomnia

A plugin to make the screen not dim (and eventually lock the device).

Installation

Run the following command from the root of your project:

tns plugin add nativescript-insomnia

Usage

To use this plugin you must first require() it:

var insomnia = require("nativescript-insomnia");

keepAwake

  insomnia.keepAwake().then(function() {
      console.log("Insomnia is active");
  })

allowSleepAgain

  insomnia.allowSleepAgain().then(function() {
      console.log("Insomnia is inactive, good night!");
  })

About

😪 NativeScript plugin to keep the device awake (not dim the screen, lock, etc)

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%