MyGit

nativescript-community/insomnia

Fork: 11 Star: 41 (更新于 2024-11-17 17:54:39)

license: 暂无

Language: JavaScript .

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

最后发布版本: v2.0.2 ( 2021-01-24 20:37:42)

GitHub网址

NativeScript Insomnia

💡 Plugin version 2.0.0+ is compatible with NativeScript 7+. If you need to target older NativeScript versions, please stick to plugin version 1.2.3.

Demo app (Angular)

This plugin is part of the plugin showcase app I built using Angular.

Installation

Run the following command from the root of your project:

tns plugin add @nativescript-community/insomnia

Usage

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

JavaScript

var insomnia = require("@nativescript-community/insomnia");

TypeScript

You could do the same as in JS, but this looks fancier, right?

import { keepAwake, allowSleepAgain } from "@nativescript-community/insomnia";

keepAwake

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

allowSleepAgain

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

最近版本更新:(数据更新于 2024-10-23 10:11:52)

2021-01-24 20:37:42 v2.0.2

2021-01-05 18:06:27 v2.0.1

2020-09-16 15:21:02 2.0.0

2019-06-13 20:36:11 1.2.3

2018-09-03 02:42:43 1.2.2

2017-02-11 03:55:52 1.2.1

2016-09-23 17:46:00 1.2.0

2016-02-27 22:48:17 1.1.1

2015-07-12 17:44:03 1.1.0

主题(topics):

awake, dimming, insomnia, nativescript, nativescript-plugin, screen

nativescript-community/insomnia同语言 JavaScript最近更新仓库

2024-11-21 23:03:24 bia-pain-bache/BPB-Worker-Panel

2024-11-21 22:46:48 MHSanaei/3x-ui

2024-11-21 07:00:59 nodejs/node

2024-11-21 00:49:46 FortAwesome/Font-Awesome

2024-11-18 14:26:02 projectdiscovery/nuclei-templates

2024-11-17 14:42:23 koodo-reader/koodo-reader