{"id":13514833,"url":"https://github.com/capacitor-community/keep-awake","last_synced_at":"2025-04-08T04:11:13.173Z","repository":{"id":38284669,"uuid":"225649811","full_name":"capacitor-community/keep-awake","owner":"capacitor-community","description":"⚡️ Capacitor plugin to prevent devices from dimming or locking the screen. ","archived":false,"fork":false,"pushed_at":"2025-02-07T09:19:41.000Z","size":791,"stargazers_count":147,"open_issues_count":0,"forks_count":18,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-02T12:18:24.484Z","etag":null,"topics":["android","capacitor","capacitor-community","capacitor-plugin","ios","web"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/capacitor-community.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-12-03T15:12:45.000Z","updated_at":"2025-03-31T03:05:57.000Z","dependencies_parsed_at":"2024-01-02T23:09:25.013Z","dependency_job_id":"e5604942-741b-449e-abd9-daaa78c649c8","html_url":"https://github.com/capacitor-community/keep-awake","commit_stats":{"total_commits":57,"total_committers":6,"mean_commits":9.5,"dds":"0.38596491228070173","last_synced_commit":"aa17f9c2a638139a65c88181975a75f68e7d11be"},"previous_names":["boosten/capacitor-keep-awake"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Fkeep-awake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Fkeep-awake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Fkeep-awake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/capacitor-community%2Fkeep-awake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/capacitor-community","download_url":"https://codeload.github.com/capacitor-community/keep-awake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247773719,"owners_count":20993639,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["android","capacitor","capacitor-community","capacitor-plugin","ios","web"],"created_at":"2024-08-01T05:01:02.461Z","updated_at":"2025-04-08T04:11:13.141Z","avatar_url":"https://github.com/capacitor-community.png","language":"Java","funding_links":[],"categories":["Plugins","Swift","Community plugins"],"sub_categories":["Community Plugins"],"readme":"\u003cp align=\"center\"\u003e\u003cbr\u003e\u003cimg src=\"https://user-images.githubusercontent.com/236501/85893648-1c92e880-b7a8-11ea-926d-95355b8175c7.png\" width=\"128\" height=\"128\" /\u003e\u003c/p\u003e\n\u003ch3 align=\"center\"\u003eKeep Awake\u003c/h3\u003e\n\u003cp align=\"center\"\u003e\u003cstrong\u003e\u003ccode\u003e@capacitor-community/keep-awake\u003c/code\u003e\u003c/strong\u003e\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  ⚡️ Capacitor plugin to prevent devices from dimming or locking the screen.\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/maintenance/yes/2025?style=flat-square\" /\u003e\n  \u003ca href=\"https://github.com/capacitor-community/keep-awake/actions?query=workflow%3A%22CI%22\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/capacitor-community/keep-awake/ci.yml?branch=master\u0026style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@capacitor-community/keep-awake\"\u003e\u003cimg src=\"https://img.shields.io/npm/l/@capacitor-community/keep-awake?style=flat-square\" /\u003e\u003c/a\u003e\n\u003cbr\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@capacitor-community/keep-awake\"\u003e\u003cimg src=\"https://img.shields.io/npm/dw/@capacitor-community/keep-awake?style=flat-square\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://www.npmjs.com/package/@capacitor-community/keep-awake\"\u003e\u003cimg src=\"https://img.shields.io/npm/v/@capacitor-community/keep-awake?style=flat-square\" /\u003e\u003c/a\u003e\n\u003c!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section --\u003e\n\u003ca href=\"#contributors-\"\u003e\u003cimg src=\"https://img.shields.io/badge/all%20contributors-2-orange?style=flat-square\" /\u003e\u003c/a\u003e\n\u003c!-- ALL-CONTRIBUTORS-BADGE:END --\u003e\n\u003c/p\u003e\n\n## Maintainers\n\n| Maintainer    | GitHub                                          | Social                                            |\n| ------------- | ----------------------------------------------- | ------------------------------------------------- |\n| Kevin Boosten | [kevinboosten](https://github.com/kevinboosten) | [@kevinboosten](https://twitter.com/kevinboosten) |\n| Robin Genz    | [robingenz](https://github.com/robingenz)       | [@robin_genz](https://twitter.com/robin_genz)     |\n\n## Installation\n\n```shell\nnpm install @capacitor-community/keep-awake\nnpx cap sync\n```\n\n## Configuration\n\nNo configuration required for this plugin.\n\n## Demo\n\nA working example can be found here: [robingenz/capacitor-plugin-demo](https://github.com/robingenz/capacitor-plugin-demo)\n\n## Usage\n\n```typescript\nimport { KeepAwake } from '@capacitor-community/keep-awake';\n\nconst keepAwake = async () =\u003e {\n  await KeepAwake.keepAwake();\n};\n\nconst allowSleep = async () =\u003e {\n  await KeepAwake.allowSleep();\n};\n\nconst isSupported = async () =\u003e {\n  const result = await KeepAwake.isSupported();\n  return result.isSupported;\n};\n\nconst isKeptAwake = async () =\u003e {\n  const result = await KeepAwake.isKeptAwake();\n  return result.isKeptAwake;\n};\n```\n\n## API\n\n\u003cdocgen-index\u003e\n\n* [`keepAwake()`](#keepawake)\n* [`allowSleep()`](#allowsleep)\n* [`isSupported()`](#issupported)\n* [`isKeptAwake()`](#iskeptawake)\n* [Interfaces](#interfaces)\n\n\u003c/docgen-index\u003e\n\n\u003cdocgen-api\u003e\n\u003c!--Update the source file JSDoc comments and rerun docgen to update the docs below--\u003e\n\n### keepAwake()\n\n```typescript\nkeepAwake() =\u003e Promise\u003cvoid\u003e\n```\n\nPrevent the device from dimming the screen.\n\n--------------------\n\n\n### allowSleep()\n\n```typescript\nallowSleep() =\u003e Promise\u003cvoid\u003e\n```\n\nAllow the device to dim the screen.\n\n--------------------\n\n\n### isSupported()\n\n```typescript\nisSupported() =\u003e Promise\u003cIsSupportedResult\u003e\n```\n\nWhether keep awake is supported or not.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#issupportedresult\"\u003eIsSupportedResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### isKeptAwake()\n\n```typescript\nisKeptAwake() =\u003e Promise\u003cIsKeptAwakeResult\u003e\n```\n\nCheck if the device is kept awake.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#iskeptawakeresult\"\u003eIsKeptAwakeResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### Interfaces\n\n\n#### IsSupportedResult\n\n| Prop              | Type                 |\n| ----------------- | -------------------- |\n| **`isSupported`** | \u003ccode\u003eboolean\u003c/code\u003e |\n\n\n#### IsKeptAwakeResult\n\n| Prop              | Type                 |\n| ----------------- | -------------------- |\n| **`isKeptAwake`** | \u003ccode\u003eboolean\u003c/code\u003e |\n\n\u003c/docgen-api\u003e\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/capacitor-community/keep-awake/blob/master/CHANGELOG.md).\n\n## License\n\nSee [LICENSE](https://github.com/capacitor-community/keep-awake/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapacitor-community%2Fkeep-awake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcapacitor-community%2Fkeep-awake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcapacitor-community%2Fkeep-awake/lists"}