MyGit

nativescript-community/insomnia

Fork: 11 Star: 40 (更新于 2024-05-19 23:11:32)

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-05-26 02:25:12)

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-07-04 07:31:29 vercel/next.js

2024-06-25 20:14:46 projectdiscovery/nuclei-templates

2024-06-22 08:38:28 sveltejs/svelte

2024-06-21 12:53:16 fchollet/ARC-AGI

2024-06-20 17:48:22 4ian/GDevelop

2024-06-18 06:07:40 langflow-ai/langflow