{"id":13795435,"url":"https://github.com/Cap-go/capacitor-flash","last_synced_at":"2025-05-12T22:31:00.332Z","repository":{"id":40470081,"uuid":"428109916","full_name":"Cap-go/capacitor-flash","owner":"Cap-go","description":"Switch the Flashlight / Torch of your device.","archived":false,"fork":false,"pushed_at":"2024-02-12T21:09:46.000Z","size":510,"stargazers_count":11,"open_issues_count":13,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-04-14T00:50:14.144Z","etag":null,"topics":["android","capacitor","ionic","ios","typescript"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"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":null,"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},"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":"2021-11-15T03:25:25.000Z","updated_at":"2023-10-06T07:20:26.000Z","dependencies_parsed_at":"2023-02-10T00:15:34.145Z","dependency_job_id":"8c34d968-1264-4e01-b4cc-d0761696f412","html_url":"https://github.com/Cap-go/capacitor-flash","commit_stats":{"total_commits":106,"total_committers":4,"mean_commits":26.5,"dds":0.5943396226415094,"last_synced_commit":"d18205bd21103c8733331a48cc7561b1d34b70ff"},"previous_names":["riderx/capacitor-flash"],"tags_count":43,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-flash","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-flash/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-flash/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Cap-go%2Fcapacitor-flash/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Cap-go","download_url":"https://codeload.github.com/Cap-go/capacitor-flash/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224189483,"owners_count":17270662,"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","ionic","ios","typescript"],"created_at":"2024-08-03T23:00:56.820Z","updated_at":"2025-05-12T22:31:00.314Z","avatar_url":"https://github.com/Cap-go.png","language":"Java","funding_links":["https://github.com/sponsors/Cap-go","https://opencollective.com/capgo"],"categories":["Plugins","Capgo Capacitor Plugins","[Capgo plugins](https://capgo.app/)"],"sub_categories":["Community Plugins","UI \u0026 Display"],"readme":"# capacitor-flash\n  \u003ca href=\"https://capgo.app/\"\u003e\u003cimg src='https://raw.githubusercontent.com/Cap-go/capgo/main/assets/capgo_banner.png' 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\"\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\"\u003e Fix your annoying bug now, Hire a Capacitor expert 💪\u003c/a\u003e\u003c/h2\u003e\n\u003c/div\u003e\n\nSwitch the Flashlight / Torch of your device.\n\n## Install\n\n```bash\nnpm install @capgo/capacitor-flash\nnpx cap sync\n```\n\n## iOS\n\nWorks out of the box\n\n## Android\n\n1. Declare permissions in your app's `AndroidManifest.xml` file\n\n```xml\n\u003c!-- Permissions: Allows access to flashlight --\u003e\n\u003cuses-permission android:name=\"android.permission.CAMERA\" android:maxSdkVersion=\"23\" /\u003e\n\u003cuses-permission android:name=\"android.permission.FLASHLIGHT\" /\u003e\n\n\u003c!-- Actual Hardware Features Used--\u003e\n\u003cuses-feature android:name=\"android.hardware.camera.flash\" android:required=\"true\" /\u003e\n```\n\n## API\n\n\u003cdocgen-index\u003e\n\n* [`isAvailable()`](#isavailable)\n* [`switchOn(...)`](#switchon)\n* [`switchOff()`](#switchoff)\n* [`isSwitchedOn()`](#isswitchedon)\n* [`toggle()`](#toggle)\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### isAvailable()\n\n```typescript\nisAvailable() =\u003e Promise\u003c{ value: boolean; }\u003e\n```\n\nChecks if flashlight is available\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ value: boolean; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### switchOn(...)\n\n```typescript\nswitchOn(options: { intensity?: number; }) =\u003e Promise\u003cvoid\u003e\n```\n\nTurns the flashlight on\n\n| Param         | Type                                 |\n| ------------- | ------------------------------------ |\n| **`options`** | \u003ccode\u003e{ intensity?: number; }\u003c/code\u003e |\n\n--------------------\n\n\n### switchOff()\n\n```typescript\nswitchOff() =\u003e Promise\u003cvoid\u003e\n```\n\nTurns the flashlight off\n\n--------------------\n\n\n### isSwitchedOn()\n\n```typescript\nisSwitchedOn() =\u003e Promise\u003c{ value: boolean; }\u003e\n```\n\nChecks if the flashlight is turned on or off\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ value: boolean; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\n### toggle()\n\n```typescript\ntoggle() =\u003e Promise\u003c{ value: boolean; }\u003e\n```\n\nToggle the flashlight\n\n**Returns:** \u003ccode\u003ePromise\u0026lt;{ value: boolean; }\u0026gt;\u003c/code\u003e\n\n--------------------\n\n\u003c/docgen-api\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCap-go%2Fcapacitor-flash","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FCap-go%2Fcapacitor-flash","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FCap-go%2Fcapacitor-flash/lists"}