nativescript-community/insomnia
Fork: 11 Star: 41 (更新于 2025-01-19 01:41:49)
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)
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最近更新仓库
2025-01-18 18:52:53 Lyoko-Jeremie/DoLModLoaderBuild
2025-01-18 18:39:15 NumberSir/DoL-I18n-Build
2025-01-18 12:52:15 brave/brave-browser
2025-01-16 21:08:48 bia-pain-bache/BPB-Worker-Panel
2025-01-16 02:21:01 jgraph/drawio
2025-01-13 00:24:54 jerryc127/hexo-theme-butterfly