nativescript-community/insomnia
Fork: 11 Star: 41 (更新于 2024-12-10 20:42:05)
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最近更新仓库
2024-12-22 13:19:55 gethomepage/homepage
2024-12-22 00:44:14 gorhill/uBlock
2024-12-21 12:14:02 layui/layui
2024-12-21 03:44:01 emberjs/ember.js
2024-12-20 02:57:09 nodejs/node
2024-12-19 17:54:54 MHSanaei/3x-ui