{"_id":"@capawesome/capacitor-keep-awake","_rev":"4-11a24957cd9955c7cba9732753c90644","name":"@capawesome/capacitor-keep-awake","dist-tags":{"latest":"0.1.2"},"versions":{"0.0.1":{"name":"@capawesome/capacitor-keep-awake","version":"0.0.1","keywords":["capacitor","plugin","native"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-keep-awake@0.0.1","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/plugins/keep-awake/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"259a8099c1200d44d45f683e4beb22c2e90e69c1","tarball":"https://registry.npmjs.org/@capawesome/capacitor-keep-awake/-/capacitor-keep-awake-0.0.1.tgz","fileCount":33,"integrity":"sha512-4/w6x/e0QjPpBmVE1iiXaxR21ySLmHCLIIAJ2vq/u+pngzTLp25oQCcuAmbo92mXzZn04VGYDjoW8wAWfMuTcg==","signatures":[{"sig":"MEYCIQDWQPADdAWv9ONbzXc9zb5Z9P2en1G7mRpigLXozmIrgwIhAOJEoMw8cZBLm/oZNXoRP6j8vyKzaUHaZyX85oHbwQ3f","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49323},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"8dd31ce5d3f16f94fb71d033f47512e99908f4e4","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api KeepAwakePlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"robingenz","email":"mail@robingenz.dev"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.13.0","description":"Capacitor plugin to keep the screen awake.","directories":{},"_nodeVersion":"24.16.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-keep-awake_0.0.1_1783405271450_0.3574595975296475","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@capawesome/capacitor-keep-awake","version":"0.1.0","keywords":["capacitor","plugin","native","capacitor-plugin","keep awake","keep screen on","wake lock","screen wake lock","prevent sleep","screen timeout","display awake"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-keep-awake@0.1.0","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/keep-awake/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"705d53c970b919f718a15343cc1c743822680ad0","tarball":"https://registry.npmjs.org/@capawesome/capacitor-keep-awake/-/capacitor-keep-awake-0.1.0.tgz","fileCount":33,"integrity":"sha512-CItclHVxzQNRKimI5B8TjpLEuvG2Lbh0E0vcRs5SfafRH5wLNeQhS0mLhrHApBT1oxGa1J3SIhlJhzOPEwZefw==","signatures":[{"sig":"MEYCIQD3QTXguUsd1Dwy9qY3q2e9bmAUQHNa+afPSKMrMt7gvgIhAKdzNZWLxExUd2/W6K/8Pck3U5yDHKR4yxqZYvS4yJ9c","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-keep-awake@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":53668},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"1ce17b1fd14c43b2f1d5d3c2da82221e1d1dca37","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api KeepAwakePlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fd028930-79ab-4bae-b21f-474b40475d1c"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin to keep the screen awake on Android, iOS, and Web.","directories":{},"_nodeVersion":"24.18.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-keep-awake_0.1.0_1784015546759_0.7875693870581322","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@capawesome/capacitor-keep-awake","version":"0.1.1","keywords":["capacitor","plugin","native","capacitor-plugin","keep awake","keep screen on","wake lock","screen wake lock","prevent sleep","screen timeout","display awake"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","_id":"@capawesome/capacitor-keep-awake@0.1.1","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/keep-awake/","bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"dist":{"shasum":"241485a63e0521efc25c89079aad2c819b467e40","tarball":"https://registry.npmjs.org/@capawesome/capacitor-keep-awake/-/capacitor-keep-awake-0.1.1.tgz","fileCount":33,"integrity":"sha512-Tw4GG/RmgtJD0A6zZvaqZKwyjNI2KUFZnOfQ5CgWgoo+n5EDzCAe66gtxZVM2Nan0qGlSCSnEo/zw9A5EB3+5g==","signatures":[{"sig":"MEYCIQCMIVIpB4hvrmuZayyB2tluJRzAGEGLAifwDzJmzjNJfQIhAMjXrPZTFEujBz4/3cA5csXeGClmt67F6e61dDtDoakd","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-keep-awake@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":53677},"main":"dist/plugin.cjs.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","module":"dist/esm/index.js","funding":[{"url":"https://github.com/sponsors/capawesome-team/","type":"github"},{"url":"https://opencollective.com/capawesome","type":"opencollective"}],"gitHead":"3e61f4b412f9f3f512c21169bb135bbb23a67e6d","scripts":{"fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","docgen":"docgen --api KeepAwakePlugin --output-readme README.md --output-json dist/docs.json","eslint":"eslint . --ext ts","verify":"npm run verify:ios && npm run verify:android && npm run verify:web","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:web":"npm run build","prepublishOnly":"npm run build","verify:android":"cd android && ./gradlew clean build test && cd ..","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd .."},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fd028930-79ab-4bae-b21f-474b40475d1c"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"repository":{"url":"git+https://github.com/capawesome-team/capacitor-plugins.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin to keep the screen awake on Android, iOS, and Web.","directories":{},"_nodeVersion":"24.18.0","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"8.57.0","rimraf":"6.1.2","rollup":"4.53.3","swiftlint":"2.0.0","typescript":"5.9.3","@capacitor/cli":"8.0.0","@capacitor/ios":"8.0.0","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/android":"8.0.0","@ionic/eslint-config":"0.4.0","prettier-plugin-java":"2.6.7"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"_npmOperationalInternal":{"tmp":"tmp/capacitor-keep-awake_0.1.1_1784103000261_0.28915164756806977","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@capawesome/capacitor-keep-awake","version":"0.1.2","description":"Capacitor plugin to keep the screen awake on Android, iOS, and Web.","main":"dist/plugin.cjs.js","module":"dist/esm/index.js","types":"dist/esm/index.d.ts","unpkg":"dist/plugin.js","author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-plugins.git"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"funding":[{"type":"github","url":"https://github.com/sponsors/capawesome-team/"},{"type":"opencollective","url":"https://opencollective.com/capawesome"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/keep-awake/","keywords":["capacitor","plugin","native","capacitor-plugin","keep awake","keep screen on","wake lock","screen wake lock","prevent sleep","screen timeout","display awake"],"scripts":{"verify":"npm run verify:ios && npm run verify:android && npm run verify:web","verify:ios":"cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..","verify:android":"cd android && ./gradlew clean build test && cd ..","verify:web":"npm run build","lint":"npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint","fmt":"npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format","eslint":"eslint . --ext ts","prettier":"prettier \"**/*.{css,html,ts,js,java}\"","swiftlint":"node-swiftlint","docgen":"docgen --api KeepAwakePlugin --output-readme README.md --output-json dist/docs.json","build":"npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs","clean":"rimraf ./dist","watch":"tsc --watch","ios:pod:install":"cd ios && pod install --repo-update && cd ..","ios:spm:install":"cd ios && swift package resolve && cd ..","prepublishOnly":"npm run build"},"devDependencies":{"@capacitor/android":"8.0.0","@capacitor/cli":"8.4.2","@capacitor/core":"8.0.0","@capacitor/docgen":"0.3.1","@capacitor/ios":"8.0.0","@ionic/eslint-config":"0.4.0","eslint":"8.57.0","prettier-plugin-java":"2.9.7","rimraf":"6.1.2","rollup":"4.62.3","swiftlint":"2.0.0","typescript":"5.9.3"},"peerDependencies":{"@capacitor/core":">=8.0.0"},"eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"publishConfig":{"access":"public"},"gitHead":"7c1937ed10b7de86ca2c1cdc3539a2735fd69a00","_id":"@capawesome/capacitor-keep-awake@0.1.2","_nodeVersion":"24.19.0","_npmVersion":"11.17.0","dist":{"integrity":"sha512-w8Md6prqRP/rfcGzb0MCpsFQalhwMhLT1RJYOW3jOCSShSGUyHpO8sG0srYEk4x1WPXRCfqaU2QYSJt0v0q9AA==","shasum":"7a015386a32caad36b24e39a7485187604d46add","tarball":"https://registry.npmjs.org/@capawesome/capacitor-keep-awake/-/capacitor-keep-awake-0.1.2.tgz","fileCount":33,"unpackedSize":53817,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capawesome%2fcapacitor-keep-awake@0.1.2","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGmKyhuScQ66vpYdpTFf/KJItFJh1ZQODbb+FMDszHX6AiBKpf67L4Z6J7nzDEtYkcDfWG2naPqhbTBUlpYoOhEJEw=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:fd028930-79ab-4bae-b21f-474b40475d1c"}},"directories":{},"maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/capacitor-keep-awake_0.1.2_1788337358286_0.4331149789015709"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-07T06:21:11.263Z","modified":"2026-09-02T08:22:38.750Z","0.0.1":"2026-07-07T06:21:11.598Z","0.1.0":"2026-07-14T07:52:26.925Z","0.1.1":"2026-07-15T08:10:00.404Z","0.1.2":"2026-09-02T08:22:38.418Z"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-plugins/issues"},"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"MIT","homepage":"https://capawesome.io/docs/sdks/capacitor/keep-awake/","keywords":["capacitor","plugin","native","capacitor-plugin","keep awake","keep screen on","wake lock","screen wake lock","prevent sleep","screen timeout","display awake"],"repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-plugins.git"},"description":"Capacitor plugin to keep the screen awake on Android, iOS, and Web.","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"readme":"# Capacitor Keep Awake Plugin\n\nCapacitor plugin to keep the screen awake.\n\n<div class=\"capawesome-z29o10a\">\n  <a href=\"https://cloud.capawesome.io/\" target=\"_blank\">\n    <img alt=\"Deliver Live Updates to your Capacitor app with Capawesome Cloud\" src=\"https://cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png?t=1\" />\n  </a>\n</div>\n\n## Features\n\n- 🌙 **Keep awake**: Prevent the screen from dimming or turning off.\n- 💤 **Allow sleep**: Restore the default screen sleep behavior at any time.\n- 🔍 **State**: Read whether the screen is currently kept awake.\n- 🌐 **Cross-platform**: Supports Android, iOS and Web (via the Screen Wake Lock API).\n- 🤝 **Compatibility**: Works alongside the [Battery](https://capawesome.io/docs/sdks/capacitor/battery/), [Screen Brightness](https://capawesome.io/docs/sdks/capacitor/screen-brightness/) and [Screen Orientation](https://capawesome.io/docs/sdks/capacitor/screen-orientation/) plugins.\n- 📦 **CocoaPods & SPM**: Supports CocoaPods and Swift Package Manager for iOS.\n- 🔁 **Up-to-date**: Always supports the latest Capacitor version.\n\nMissing a feature? Just [open an issue](https://github.com/capawesome-team/capacitor-plugins/issues) and we'll take a look!\n\n## Use Cases\n\nThe Keep Awake plugin is typically used whenever the screen must stay visible without user interaction, for example:\n\n- **Media playback**: Keep the screen on while users watch videos or follow along with content.\n- **Navigation and tracking**: Prevent the display from turning off during turn-by-turn navigation or workout tracking.\n- **Hands-free reading**: Keep recipes, sheet music, or step-by-step instructions visible while the user's hands are busy.\n- **Dashboards and kiosks**: Display live data or presentations without the screen dimming or sleeping.\n\n## Compatibility\n\n| Plugin Version | Capacitor Version | Status         |\n| -------------- | ----------------- | -------------- |\n| 0.x.x          | >=8.x.x           | Active support |\n\n## Installation\n\nYou can use our **AI-Assisted Setup** to install the plugin.\nAdd the [Capawesome Skills](https://github.com/capawesome-team/skills) to your AI tool using the following command:\n\n```bash\nnpx skills add capawesome-team/skills --skill capacitor-plugins\n```\n\nThen use the following prompt:\n\n```\n Use the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capawesome/capacitor-keep-awake` plugin in my project.\n```\n\nIf you prefer **Manual Setup**, install the plugin by running the following commands:\n\n```bash\nnpm install @capawesome/capacitor-keep-awake\nnpx cap sync\n```\n\nThis plugin is available on **Android**, **iOS** and **Web**. No additional permissions or configuration are required.\n\n## Configuration\n\nNo configuration required for this plugin.\n\n## Usage\n\nThe following examples show how to keep the screen awake, allow it to sleep again, check whether it is currently kept awake, and check whether the feature is available.\n\n### Keep the screen awake\n\nPrevent the screen from dimming or turning off. The screen is kept awake until `allowSleep(...)` is called or the app is restarted. This only affects your app and is not a system-wide setting:\n\n```typescript\nimport { KeepAwake } from '@capawesome/capacitor-keep-awake';\n\nconst keepAwake = async () => {\n  await KeepAwake.keepAwake();\n};\n```\n\n### Allow the screen to sleep again\n\nRestore the default screen sleep behavior at any time:\n\n```typescript\nimport { KeepAwake } from '@capawesome/capacitor-keep-awake';\n\nconst allowSleep = async () => {\n  await KeepAwake.allowSleep();\n};\n```\n\n### Check if the screen is kept awake\n\nRead whether the screen is currently kept awake:\n\n```typescript\nimport { KeepAwake } from '@capawesome/capacitor-keep-awake';\n\nconst isKeptAwake = async () => {\n  const { keptAwake } = await KeepAwake.isKeptAwake();\n  return keptAwake;\n};\n```\n\n### Check if the feature is available\n\nOn the Web, keeping the screen awake depends on whether the browser supports the [Screen Wake Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API). On Android and iOS, this always returns `true`:\n\n```typescript\nimport { KeepAwake } from '@capawesome/capacitor-keep-awake';\n\nconst isAvailable = async () => {\n  const { available } = await KeepAwake.isAvailable();\n  return available;\n};\n```\n\n## API\n\n<docgen-index>\n\n* [`allowSleep()`](#allowsleep)\n* [`isAvailable()`](#isavailable)\n* [`isKeptAwake()`](#iskeptawake)\n* [`keepAwake()`](#keepawake)\n* [Interfaces](#interfaces)\n\n</docgen-index>\n\n<docgen-api>\n<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->\n\n### allowSleep()\n\n```typescript\nallowSleep() => Promise<void>\n```\n\nAllow the screen to dim or turn off again.\n\nThis reverses the effect of `keepAwake(...)`.\n\nOnly available on Android, iOS and Web.\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### isAvailable()\n\n```typescript\nisAvailable() => Promise<IsAvailableResult>\n```\n\nCheck if keeping the screen awake is available on this device.\n\nOn Web, this depends on whether the browser supports the\n[Screen Wake Lock API](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API).\nOn Android and iOS, this always returns `true`.\n\nOnly available on Android, iOS and Web.\n\n**Returns:** <code>Promise&lt;<a href=\"#isavailableresult\">IsAvailableResult</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### isKeptAwake()\n\n```typescript\nisKeptAwake() => Promise<IsKeptAwakeResult>\n```\n\nCheck if the screen is currently kept awake.\n\nOnly available on Android, iOS and Web.\n\n**Returns:** <code>Promise&lt;<a href=\"#iskeptawakeresult\">IsKeptAwakeResult</a>&gt;</code>\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### keepAwake()\n\n```typescript\nkeepAwake() => Promise<void>\n```\n\nKeep the screen awake by preventing it from dimming or turning off.\n\nThe screen is kept awake until `allowSleep(...)` is called or the app is\nrestarted. This setting only affects your app and is not system-wide.\n\nOnly available on Android, iOS and Web.\n\n**Since:** 0.1.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### IsAvailableResult\n\n| Prop            | Type                 | Description                                                          | Since |\n| --------------- | -------------------- | -------------------------------------------------------------------- | ----- |\n| **`available`** | <code>boolean</code> | Whether keeping the screen awake is available on this device or not. | 0.1.0 |\n\n\n#### IsKeptAwakeResult\n\n| Prop            | Type                 | Description                                        | Since |\n| --------------- | -------------------- | -------------------------------------------------- | ----- |\n| **`keptAwake`** | <code>boolean</code> | Whether the screen is currently kept awake or not. | 0.1.0 |\n\n</docgen-api>\n\n## Behavior\n\nKeep the following in mind when using this plugin:\n\n- **App scope**: Keeping the screen awake only affects your app and is not a system-wide setting.\n- **State reset**: The screen is only kept awake until `allowSleep(...)` is called or the app is restarted.\n- **Web auto-release**: On the Web, the underlying [Screen Wake Lock](https://developer.mozilla.org/en-US/docs/Web/API/Screen_Wake_Lock_API) is automatically released by the browser whenever the tab becomes hidden (for example, when the user switches tabs or minimizes the window). The plugin automatically re-acquires the wake lock once the tab becomes visible again, as long as `allowSleep(...)` has not been called in the meantime.\n\n## FAQ\n\n### How is this plugin different from other similar plugins?\n\nIt keeps the screen awake on Android, iOS, and the Web from one fully typed API, and lets you check both whether the feature is available and whether the screen is currently kept awake. On the Web it uses the Screen Wake Lock API and automatically re-acquires the lock when a hidden tab becomes visible again, so the behavior stays predictable across platforms. It needs no permissions or configuration and is actively maintained against the latest Capacitor version.\n\n### Which platforms does this plugin support?\n\nThe plugin supports Android, iOS and Web. On the Web, it relies on the Screen Wake Lock API, so availability depends on the browser. You can check this at runtime with the `isAvailable()` method, which always returns `true` on Android and iOS.\n\n### Does keeping the screen awake affect other apps?\n\nNo, keeping the screen awake only affects your app and is not a system-wide setting. As soon as the user leaves your app, the default screen sleep behavior of the device applies again.\n\n### How long is the screen kept awake?\n\nThe screen is kept awake until `allowSleep(...)` is called or the app is restarted. The setting is not persisted across app restarts.\n\n### Why does the screen sleep again on the Web after switching tabs?\n\nOn the Web, the browser automatically releases the underlying wake lock whenever the tab becomes hidden, for example when the user switches tabs or minimizes the window. The plugin automatically re-acquires the wake lock once the tab becomes visible again, as long as `allowSleep(...)` has not been called in the meantime. See the [Behavior](#behavior) section for details.\n\n### Do I need any permissions or configuration?\n\nNo, the plugin does not require any permissions or configuration on any platform. Simply install it and call `keepAwake()`.\n\n### Can I use this plugin with Ionic, React, Vue or Angular?\n\nYes, the plugin is framework-agnostic. It works in any Capacitor app regardless of the web framework, including Ionic with Angular, React, or Vue, as well as plain JavaScript projects.\n\n## Related Plugins\n\n- [Battery](https://capawesome.io/docs/sdks/capacitor/battery/): Access battery information of the device.\n- [Screen Brightness](https://capawesome.io/docs/sdks/capacitor/screen-brightness/): Read and control the screen brightness.\n- [Screen Orientation](https://capawesome.io/docs/sdks/capacitor/screen-orientation/): Lock and unlock the screen orientation.\n\n## Newsletter\n\nStay up to date with the latest news and updates about the Capawesome, Capacitor, and Ionic ecosystem by subscribing to our [Capawesome Newsletter](https://cloud.capawesome.io/newsletter/).\n\n## Changelog\n\nSee [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/keep-awake/CHANGELOG.md).\n\n## License\n\nSee [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/keep-awake/LICENSE).\n","readmeFilename":"README.md"}