{"id":42549637,"url":"https://github.com/cap-go/capacitor-brightness","last_synced_at":"2026-06-05T00:01:06.414Z","repository":{"id":332104674,"uuid":"1127825893","full_name":"Cap-go/capacitor-brightness","owner":"Cap-go","description":"Capacitor plugin for controlling screen brightness on iOS and Android","archived":false,"fork":false,"pushed_at":"2026-06-04T09:37:04.000Z","size":332,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-04T11:10:13.339Z","etag":null,"topics":["capacitor","capacitor-plugin"],"latest_commit_sha":null,"homepage":"https://capgo.app/docs/plugins/brightness/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Cap-go.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null},"funding":{"github":"Cap-go","patreon":null,"open_collective":"capgo","ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2026-01-04T17:06:15.000Z","updated_at":"2026-06-04T09:37:08.000Z","dependencies_parsed_at":"2026-03-17T14:04:29.851Z","dependency_job_id":null,"html_url":"https://github.com/Cap-go/capacitor-brightness","commit_stats":null,"previous_names":["cap-go/capacitor-brightness"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/Cap-go/capacitor-brightness","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-brightness","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-brightness/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-brightness/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-brightness/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cap-go","download_url":"https://codeload.github.com/Cap-go/capacitor-brightness/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-brightness/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33924832,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["capacitor","capacitor-plugin"],"created_at":"2026-01-28T19:03:12.091Z","updated_at":"2026-06-05T00:01:06.407Z","avatar_url":"https://github.com/Cap-go.png","language":"JavaScript","funding_links":["https://github.com/sponsors/Cap-go","https://opencollective.com/capgo"],"categories":[],"sub_categories":[],"readme":"# @capgo/capacitor-brightness\n\u003ca href=\"https://capgo.app/\"\u003e\u003cimg src=\"https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-brightness\" alt=\"Capgo - Instant updates for Capacitor\" /\u003e\u003c/a\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/?ref=plugin_brightness\"\u003e ➡️ Get Instant updates for your App with Capgo\u003c/a\u003e\u003c/h2\u003e\n  \u003ch2\u003e\u003ca href=\"https://capgo.app/consulting/?ref=plugin_brightness\"\u003e Missing a feature? We'll build the plugin for you 💪\u003c/a\u003e\u003c/h2\u003e\n\u003c/div\u003e\n\nControl screen brightness on iOS and Android.\n\n## Why Capacitor Brightness?\n\nThe only Capacitor plugin providing **complete brightness control** for both iOS and Android:\n\n- **App-level brightness** - Control brightness for your activity without affecting system settings\n- **System-level brightness** - Modify the global device brightness (Android)\n- **Auto/Manual mode** - Switch between automatic and manual brightness modes (Android)\n- **Permission handling** - Built-in support for WRITE_SETTINGS permission flow\n- **Cross-platform** - Consistent API across iOS and Android\n\nEssential for reading apps, video players, camera apps, and any app needing screen brightness control.\n\n## Documentation\n\nFull documentation available at: https://capgo.app/docs/plugins/brightness/\n\n## Compatibility\n\n| Plugin version | Capacitor compatibility | Maintained |\n| -------------- | ----------------------- | ---------- |\n| v8.\\*.\\*       | v8.\\*.\\*                | ✅          |\n| v7.\\*.\\*       | v7.\\*.\\*                | On demand   |\n| v6.\\*.\\*       | v6.\\*.\\*                | ❌          |\n| v5.\\*.\\*       | v5.\\*.\\*                | ❌          |\n\n\u003e **Note:** The major version of this plugin follows the major version of Capacitor. Use the version that matches your Capacitor installation (e.g., plugin v8 for Capacitor 8). Only the latest major version is actively maintained.\n\n## Install\n\n```bash\nnpm install @capgo/capacitor-brightness\nnpx cap sync\n```\n\n## Android Configuration\n\nFor Android, if you want to modify the system brightness (not just the app brightness), you need to add the `WRITE_SETTINGS` permission to your `AndroidManifest.xml`:\n\n```xml\n\u003cuses-permission android:name=\"android.permission.WRITE_SETTINGS\" /\u003e\n```\n\nNote: This permission requires user confirmation through system settings on Android 6.0+.\n\n## Requirements\n\n- iOS: iOS 15+ (uses UIScreen.brightness)\n- Android: API 24+ (uses WindowManager for app brightness, Settings.System for system brightness)\n\n## API\n\n\u003cdocgen-index\u003e\n\n* [`getBrightness()`](#getbrightness)\n* [`setBrightness(...)`](#setbrightness)\n* [`getSystemBrightness()`](#getsystembrightness)\n* [`setSystemBrightness(...)`](#setsystembrightness)\n* [`getSystemBrightnessMode()`](#getsystembrightnessmode)\n* [`setSystemBrightnessMode(...)`](#setsystembrightnessmode)\n* [`isUsingSystemBrightness()`](#isusingsystembrightness)\n* [`restoreSystemBrightness()`](#restoresystembrightness)\n* [`isAvailable()`](#isavailable)\n* [`checkPermissions()`](#checkpermissions)\n* [`requestPermissions()`](#requestpermissions)\n* [`getPluginVersion()`](#getpluginversion)\n* [Interfaces](#interfaces)\n* [Type Aliases](#type-aliases)\n* [Enums](#enums)\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### getBrightness()\n\n```typescript\ngetBrightness() =\u003e Promise\u003cGetBrightnessResult\u003e\n```\n\nGet the current brightness level of the device's main screen.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#getbrightnessresult\"\u003eGetBrightnessResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 8.0.0\n\n--------------------\n\n\n### setBrightness(...)\n\n```typescript\nsetBrightness(options: SetBrightnessOptions) =\u003e Promise\u003cvoid\u003e\n```\n\nSet the brightness level of the device's main screen.\n\nOn iOS, the brightness will persist until the device is locked.\nOn Android, the brightness only applies to the current activity.\n\n| Param         | Type                                                                  | Description               |\n| ------------- | --------------------------------------------------------------------- | ------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#setbrightnessoptions\"\u003eSetBrightnessOptions\u003c/a\u003e\u003c/code\u003e | - The brightness options. |\n\n**Since:** 8.0.0\n\n--------------------\n\n\n### getSystemBrightness()\n\n```typescript\ngetSystemBrightness() =\u003e Promise\u003cGetBrightnessResult\u003e\n```\n\nGet the system-wide screen brightness.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#getbrightnessresult\"\u003eGetBrightnessResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 8.0.0\n\n--------------------\n\n\n### setSystemBrightness(...)\n\n```typescript\nsetSystemBrightness(options: SetBrightnessOptions) =\u003e Promise\u003cvoid\u003e\n```\n\nSet the system-wide screen brightness.\nRequires WRITE_SETTINGS permission on Android.\nThis also changes the brightness mode to MANUAL.\n\n| Param         | Type                                                                  | Description               |\n| ------------- | --------------------------------------------------------------------- | ------------------------- |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#setbrightnessoptions\"\u003eSetBrightnessOptions\u003c/a\u003e\u003c/code\u003e | - The brightness options. |\n\n**Since:** 8.0.0\n\n--------------------\n\n\n### getSystemBrightnessMode()\n\n```typescript\ngetSystemBrightnessMode() =\u003e Promise\u003cGetBrightnessModeResult\u003e\n```\n\nGet the current system brightness mode (automatic or manual).\nRequires WRITE_SETTINGS permission on Android.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#getbrightnessmoderesult\"\u003eGetBrightnessModeResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 8.0.0\n\n--------------------\n\n\n### setSystemBrightnessMode(...)\n\n```typescript\nsetSystemBrightnessMode(options: SetBrightnessModeOptions) =\u003e Promise\u003cvoid\u003e\n```\n\nSet the system brightness mode (automatic or manual).\nRequires WRITE_SETTINGS permission on Android.\n\n| Param         | Type                                                                          | Description                    |\n| ------------- | ----------------------------------------------------------------------------- | ------------------------------ |\n| **`options`** | \u003ccode\u003e\u003ca href=\"#setbrightnessmodeoptions\"\u003eSetBrightnessModeOptions\u003c/a\u003e\u003c/code\u003e | - The brightness mode options. |\n\n**Since:** 8.0.0\n\n--------------------\n\n\n### isUsingSystemBrightness()\n\n```typescript\nisUsingSystemBrightness() =\u003e Promise\u003cIsUsingSystemBrightnessResult\u003e\n```\n\nCheck if the current activity is using the system-wide brightness value.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#isusingsystembrightnessresult\"\u003eIsUsingSystemBrightnessResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 8.0.0\n\n--------------------\n\n\n### restoreSystemBrightness()\n\n```typescript\nrestoreSystemBrightness() =\u003e Promise\u003cvoid\u003e\n```\n\nReset the brightness setting of the current activity to use the system-wide value.\n\n**Since:** 8.0.0\n\n--------------------\n\n\n### isAvailable()\n\n```typescript\nisAvailable() =\u003e Promise\u003cIsAvailableResult\u003e\n```\n\nCheck if the Brightness API is available on the current device.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#isavailableresult\"\u003eIsAvailableResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 8.0.0\n\n--------------------\n\n\n### checkPermissions()\n\n```typescript\ncheckPermissions() =\u003e Promise\u003cPermissionStatus\u003e\n```\n\nCheck user's permissions for accessing system brightness.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#permissionstatus\"\u003ePermissionStatus\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 8.0.0\n\n--------------------\n\n\n### requestPermissions()\n\n```typescript\nrequestPermissions() =\u003e Promise\u003cPermissionStatus\u003e\n```\n\nRequest permissions for accessing system brightness.\nOn Android, this opens the system settings to grant WRITE_SETTINGS permission.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#permissionstatus\"\u003ePermissionStatus\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 8.0.0\n\n--------------------\n\n\n### getPluginVersion()\n\n```typescript\ngetPluginVersion() =\u003e Promise\u003cGetPluginVersionResult\u003e\n```\n\nGet the native plugin version.\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;\u003ca href=\"#getpluginversionresult\"\u003eGetPluginVersionResult\u003c/a\u003e\u0026gt;\u003c/code\u003e\n\n**Since:** 8.0.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### GetBrightnessResult\n\nResult of getBrightness or getSystemBrightness.\n\n| Prop             | Type                | Description                                                                                 | Since |\n| ---------------- | ------------------- | ------------------------------------------------------------------------------------------- | ----- |\n| **`brightness`** | \u003ccode\u003enumber\u003c/code\u003e | The brightness value from 0 to 1. 0 is the minimum brightness, 1 is the maximum brightness. | 8.0.0 |\n\n\n#### SetBrightnessOptions\n\nOptions for setBrightness or setSystemBrightness.\n\n| Prop             | Type                | Description                                                                                 | Since |\n| ---------------- | ------------------- | ------------------------------------------------------------------------------------------- | ----- |\n| **`brightness`** | \u003ccode\u003enumber\u003c/code\u003e | The brightness value from 0 to 1. 0 is the minimum brightness, 1 is the maximum brightness. | 8.0.0 |\n\n\n#### GetBrightnessModeResult\n\nResult of getSystemBrightnessMode.\n\n| Prop       | Type                                                      | Description                  | Since |\n| ---------- | --------------------------------------------------------- | ---------------------------- | ----- |\n| **`mode`** | \u003ccode\u003e\u003ca href=\"#brightnessmode\"\u003eBrightnessMode\u003c/a\u003e\u003c/code\u003e | The current brightness mode. | 8.0.0 |\n\n\n#### SetBrightnessModeOptions\n\nOptions for setSystemBrightnessMode.\n\n| Prop       | Type                                                      | Description                                           | Since |\n| ---------- | --------------------------------------------------------- | ----------------------------------------------------- | ----- |\n| **`mode`** | \u003ccode\u003e\u003ca href=\"#brightnessmode\"\u003eBrightnessMode\u003c/a\u003e\u003c/code\u003e | The brightness mode to set. Cannot be set to UNKNOWN. | 8.0.0 |\n\n\n#### IsUsingSystemBrightnessResult\n\nResult of isUsingSystemBrightness.\n\n| Prop          | Type                 | Description                                                             | Since |\n| ------------- | -------------------- | ----------------------------------------------------------------------- | ----- |\n| **`isUsing`** | \u003ccode\u003eboolean\u003c/code\u003e | Whether the current activity is using the system-wide brightness value. | 8.0.0 |\n\n\n#### IsAvailableResult\n\nResult of isAvailable.\n\n| Prop            | Type                 | Description                                                    | Since |\n| --------------- | -------------------- | -------------------------------------------------------------- | ----- |\n| **`available`** | \u003ccode\u003eboolean\u003c/code\u003e | Whether the Brightness API is available on the current device. | 8.0.0 |\n\n\n#### PermissionStatus\n\nPermission status result.\n\n| Prop             | Type                                                        | Description                                                    | Since |\n| ---------------- | ----------------------------------------------------------- | -------------------------------------------------------------- | ----- |\n| **`brightness`** | \u003ccode\u003e\u003ca href=\"#permissionstate\"\u003ePermissionState\u003c/a\u003e\u003c/code\u003e | Whether the permission to modify system brightness is granted. | 8.0.0 |\n\n\n#### GetPluginVersionResult\n\nResult of getPluginVersion.\n\n| Prop          | Type                | Description                | Since |\n| ------------- | ------------------- | -------------------------- | ----- |\n| **`version`** | \u003ccode\u003estring\u003c/code\u003e | The native plugin version. | 8.0.0 |\n\n\n### Type Aliases\n\n\n#### PermissionState\n\n\u003ccode\u003e'prompt' | 'prompt-with-rationale' | 'granted' | 'denied'\u003c/code\u003e\n\n\n### Enums\n\n\n#### BrightnessMode\n\n| Members         | Value          | Description                                             | Since |\n| --------------- | -------------- | ------------------------------------------------------- | ----- |\n| **`UNKNOWN`**   | \u003ccode\u003e0\u003c/code\u003e | The brightness mode is unknown.                         | 8.0.0 |\n| **`AUTOMATIC`** | \u003ccode\u003e1\u003c/code\u003e | The brightness is automatically adjusted by the system. | 8.0.0 |\n| **`MANUAL`**    | \u003ccode\u003e2\u003c/code\u003e | The brightness is manually set by the user.             | 8.0.0 |\n\n\u003c/docgen-api\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap-go%2Fcapacitor-brightness","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcap-go%2Fcapacitor-brightness","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcap-go%2Fcapacitor-brightness/lists"}