{"_id":"@capacitor-mlkit/genai-summarization","_rev":"3-989d8484428e0463541149ea3afe43b5","name":"@capacitor-mlkit/genai-summarization","dist-tags":{"latest":"8.2.1"},"versions":{"8.1.0":{"name":"@capacitor-mlkit/genai-summarization","version":"8.1.0","keywords":["capacitor","plugin","native","capacitor-plugin","mlkit","ml kit","genai","gemini nano","summarization","summarize","on-device ai"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"Apache-2.0","_id":"@capacitor-mlkit/genai-summarization@8.1.0","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/mlkit/genai-summarization/","bugs":{"url":"https://github.com/capawesome-team/capacitor-mlkit/issues"},"dist":{"shasum":"77c94578ed93608084c194471e9501e55992e2a5","tarball":"https://registry.npmjs.org/@capacitor-mlkit/genai-summarization/-/genai-summarization-8.1.0.tgz","fileCount":36,"integrity":"sha512-q8EiwwVQe3OgLzHlmwP4WQP0mudkJwVf4KKTksTQI1qzwkOTTcMMgDppZQyBNwAZJNXkZ9jP5iLSKlSBEXVylw==","signatures":[{"sig":"MEUCIQDa22kdP9oyCBIUw8/D6k2LtifkkD/n3ExNZjPcikfb4wIgcXin0iLKfaA06KWoHmVaj/tqcEquHnTkY0PqdL36cA4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":104559},"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":"6557f01f9f882afd5a13dff597f7635009585822","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 GenAiSummarizationPlugin --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"}},"swiftlint":"@ionic/swiftlint-config","repository":{"url":"git+https://github.com/capawesome-team/capacitor-mlkit.git","type":"git"},"_npmVersion":"11.13.0","description":"Capacitor plugin for ML Kit GenAI Summarization on Android.","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/genai-summarization_8.1.0_1783756947565_0.9815216970346141","host":"s3://npm-registry-packages-npm-production"}},"8.2.0":{"name":"@capacitor-mlkit/genai-summarization","version":"8.2.0","keywords":["capacitor","plugin","native","capacitor-plugin","mlkit","ml kit","genai","gemini nano","summarization","summarize","on-device ai"],"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"Apache-2.0","_id":"@capacitor-mlkit/genai-summarization@8.2.0","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"homepage":"https://capawesome.io/docs/sdks/capacitor/mlkit/genai-summarization/","bugs":{"url":"https://github.com/capawesome-team/capacitor-mlkit/issues"},"dist":{"shasum":"c4738e976797fe25ee53175cbc3828c819fc7571","tarball":"https://registry.npmjs.org/@capacitor-mlkit/genai-summarization/-/genai-summarization-8.2.0.tgz","fileCount":36,"integrity":"sha512-TDuzqu530CVeRVmtcY2U0GYykdLz1D6vMszOYE46pwix4ZkFoQoaCiSEpbYgcM90F7FaNTaogZ4kMlaJ0m3gqg==","signatures":[{"sig":"MEUCIQDQ+W17e1Jx6hDBzTAlwvs5LEegQsePsCHLw+Vias2BegIgVL3yn9xaovUNUY+v6qu8JgaD2Zb7c7b9LuHE75a2jJM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capacitor-mlkit%2fgenai-summarization@8.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":104559},"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":"b960e3339eb497476360d5a6b24bb993f3449ba8","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 GenAiSummarizationPlugin --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:54fda6bc-bd0d-4f91-a37d-997b4bb8acb4"}},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"swiftlint":"@ionic/swiftlint-config","repository":{"url":"git+https://github.com/capawesome-team/capacitor-mlkit.git","type":"git"},"_npmVersion":"11.16.0","description":"Capacitor plugin for ML Kit GenAI Summarization on Android.","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/genai-summarization_8.2.0_1784269871277_0.20738610489990728","host":"s3://npm-registry-packages-npm-production"}},"8.2.1":{"name":"@capacitor-mlkit/genai-summarization","version":"8.2.1","description":"Capacitor plugin for ML Kit GenAI Summarization on Android.","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":"Apache-2.0","repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-mlkit.git"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-mlkit/issues"},"funding":[{"type":"github","url":"https://github.com/sponsors/capawesome-team/"},{"type":"opencollective","url":"https://opencollective.com/capawesome"}],"keywords":["capacitor","plugin","native","capacitor-plugin","mlkit","ml kit","genai","gemini nano","summarization","summarize","on-device ai"],"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 GenAiSummarizationPlugin --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.5.0","@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"},"swiftlint":"@ionic/swiftlint-config","eslintConfig":{"extends":"@ionic/eslint-config/recommended"},"capacitor":{"ios":{"src":"ios"},"android":{"src":"android"}},"publishConfig":{"access":"public"},"homepage":"https://capawesome.io/docs/sdks/capacitor/mlkit/genai-summarization/","gitHead":"0fcd1977cfb70d9c39d618680045cf01434aebf2","_id":"@capacitor-mlkit/genai-summarization@8.2.1","_nodeVersion":"24.20.0","_npmVersion":"11.19.0","dist":{"integrity":"sha512-94c3sLSuujDlnasG0kZEWdBIzejU+Ib56JH/rpAQ4pc5C724g1VS7D2NHxBUL590DsDSHpWqqgypXxyo8nR53Q==","shasum":"62847cafd90c2a0e101c2c2d0ba09ee0183ec589","tarball":"https://registry.npmjs.org/@capacitor-mlkit/genai-summarization/-/genai-summarization-8.2.1.tgz","fileCount":36,"unpackedSize":104429,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@capacitor-mlkit%2fgenai-summarization@8.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCLCuNmB9tsd2BNj+/i+p10NacyUcsHH6AL5RU4fdz5xAIgFPVYtu75DC+iUjN2HKRFSuYxMj+fsCHS51Ig+568+mk="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:54fda6bc-bd0d-4f91-a37d-997b4bb8acb4"}},"directories":{},"maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/genai-summarization_8.2.1_1789015851772_0.44092160789545565"},"_hasShrinkwrap":false}},"time":{"created":"2026-07-11T08:02:27.399Z","modified":"2026-09-10T04:50:52.296Z","8.1.0":"2026-07-11T08:02:27.717Z","8.2.0":"2026-07-17T06:31:11.416Z","8.2.1":"2026-09-10T04:50:51.901Z"},"bugs":{"url":"https://github.com/capawesome-team/capacitor-mlkit/issues"},"author":{"name":"Robin Genz","email":"mail@robingenz.dev"},"license":"Apache-2.0","homepage":"https://capawesome.io/docs/sdks/capacitor/mlkit/genai-summarization/","keywords":["capacitor","plugin","native","capacitor-plugin","mlkit","ml kit","genai","gemini nano","summarization","summarize","on-device ai"],"repository":{"type":"git","url":"git+https://github.com/capawesome-team/capacitor-mlkit.git"},"description":"Capacitor plugin for ML Kit GenAI Summarization on Android.","maintainers":[{"name":"robingenz","email":"mail@robingenz.dev"}],"readme":"# Capacitor ML Kit GenAI Summarization Plugin\n\nUnofficial Capacitor plugin for [ML Kit GenAI Summarization](https://developers.google.com/ml-kit/genai/summarization).[^1]\n\n> [!WARNING]\n> The ML Kit GenAI APIs are currently in **beta**. The API surface and behavior may change in future releases.\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## Use Cases\n\nThe GenAI Summarization plugin is typically used to summarize text on-device using Gemini Nano, for example:\n\n- **Article summaries**: Give users a quick overview of long articles or documents in one to three bullet points.\n- **Chat recaps**: Summarize long chat conversations so users can catch up at a glance.\n- **Note-taking**: Condense meeting notes or transcripts into their key points.\n\n## Requirements\n\nThis plugin uses [Gemini Nano](https://developers.google.com/ml-kit/genai), which runs entirely on-device. It is only available on Android and has the following device requirements:\n\n- The device must support Gemini Nano (see [supported devices](https://developers.google.com/ml-kit/genai#supported_devices)).\n- The device must run Android API level 26 or higher.\n- The device must not have an unlocked bootloader.\n\nUse the `checkFeatureStatus(...)` method to check whether the feature is available on the device.\n\n## Compatibility\n\n| Plugin Version | Capacitor Version | Status         |\n| -------------- | ----------------- | -------------- |\n| 8.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```\nUse the `capacitor-plugins` skill from `capawesome-team/skills` to install the `@capacitor-mlkit/genai-summarization` plugin in my project.\n```\n\nIf you prefer **Manual Setup**, install the plugin by running the following commands and follow the platform-specific instructions below:\n\n```bash\nnpm install @capacitor-mlkit/genai-summarization\nnpx cap sync\n```\n\n### Android\n\n#### API level\n\nThis plugin requires a minimum API level of 26. Make sure to set the `minSdkVersion` in your `variables.gradle` file to at least `26`.\n\n#### Variables\n\nThis plugin will use the following project variables (defined in your app’s `variables.gradle` file):\n\n- `$mlkitGenaiSummarizationVersion` version of `com.google.mlkit:genai-summarization` (default: `1.0.0-beta1`)\n\n## Usage\n\nThe following example shows how to check the feature status, download the feature and summarize a text.\n\n### Check the feature status\n\nBefore using the summarization feature, check whether it is available on the device. The feature availability depends on the configured input type, output type and language:\n\n```typescript\nimport {\n  FeatureStatus,\n  GenAiSummarization,\n  InputType,\n  Language,\n  OutputType,\n} from '@capacitor-mlkit/genai-summarization';\n\nconst checkFeatureStatus = async () => {\n  const { featureStatus } = await GenAiSummarization.checkFeatureStatus({\n    inputType: InputType.Article,\n    language: Language.English,\n    outputType: OutputType.ThreeBullets,\n  });\n  return featureStatus === FeatureStatus.Available;\n};\n```\n\n### Download the feature\n\nIf the feature status is `DOWNLOADABLE`, download the feature before using it. Add a listener for the `downloadProgress` event to get notified about the download progress:\n\n```typescript\nimport { GenAiSummarization, InputType, Language, OutputType } from '@capacitor-mlkit/genai-summarization';\n\nconst downloadFeature = async () => {\n  await GenAiSummarization.addListener('downloadProgress', event => {\n    console.log('Total bytes downloaded:', event.totalBytesDownloaded);\n  });\n  await GenAiSummarization.downloadFeature({\n    inputType: InputType.Article,\n    language: Language.English,\n    outputType: OutputType.ThreeBullets,\n  });\n};\n```\n\n### Summarize a text\n\nPass the text to `summarize(...)` to generate a summary. Add a listener for the `inferenceProgress` event to receive partial results as they are generated:\n\n```typescript\nimport { GenAiSummarization, InputType, Language, OutputType } from '@capacitor-mlkit/genai-summarization';\n\nconst summarize = async () => {\n  await GenAiSummarization.addListener('inferenceProgress', event => {\n    console.log('Partial result:', event.text);\n  });\n  const { summary } = await GenAiSummarization.summarize({\n    text: 'Capacitor is an open source native runtime for building Web Native apps. Create cross-platform iOS, Android, and Progressive Web Apps with JavaScript, HTML, and CSS.',\n    inputType: InputType.Article,\n    language: Language.English,\n    outputType: OutputType.ThreeBullets,\n  });\n  return summary;\n};\n```\n\n## API\n\n<docgen-index>\n\n* [`checkFeatureStatus(...)`](#checkfeaturestatus)\n* [`downloadFeature(...)`](#downloadfeature)\n* [`summarize(...)`](#summarize)\n* [`addListener('downloadProgress', ...)`](#addlistenerdownloadprogress-)\n* [`addListener('inferenceProgress', ...)`](#addlistenerinferenceprogress-)\n* [`removeAllListeners()`](#removealllisteners)\n* [Interfaces](#interfaces)\n* [Enums](#enums)\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### checkFeatureStatus(...)\n\n```typescript\ncheckFeatureStatus(options?: FeatureOptions | undefined) => Promise<CheckFeatureStatusResult>\n```\n\nCheck the current availability status of the summarization feature.\n\nIf the status is `DOWNLOADABLE`, you can download the feature\nusing `downloadFeature(...)`.\n\nOnly available on Android.\n\n| Param         | Type                                                      |\n| ------------- | --------------------------------------------------------- |\n| **`options`** | <code><a href=\"#featureoptions\">FeatureOptions</a></code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#checkfeaturestatusresult\">CheckFeatureStatusResult</a>&gt;</code>\n\n**Since:** 8.2.0\n\n--------------------\n\n\n### downloadFeature(...)\n\n```typescript\ndownloadFeature(options?: FeatureOptions | undefined) => Promise<void>\n```\n\nDownload the summarization feature.\n\nThe `downloadProgress` event listener will notify you about\nthe download progress. The returned promise resolves when\nthe download is complete or the feature is already available.\n\nOnly available on Android.\n\n| Param         | Type                                                      |\n| ------------- | --------------------------------------------------------- |\n| **`options`** | <code><a href=\"#featureoptions\">FeatureOptions</a></code> |\n\n**Since:** 8.2.0\n\n--------------------\n\n\n### summarize(...)\n\n```typescript\nsummarize(options: SummarizeOptions) => Promise<SummarizeResult>\n```\n\nSummarize the given text.\n\nThe `inferenceProgress` event listener will notify you about\npartial results as they are generated. The returned promise\nresolves with the full result.\n\nOnly available on Android.\n\n| Param         | Type                                                          |\n| ------------- | ------------------------------------------------------------- |\n| **`options`** | <code><a href=\"#summarizeoptions\">SummarizeOptions</a></code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#summarizeresult\">SummarizeResult</a>&gt;</code>\n\n**Since:** 8.2.0\n\n--------------------\n\n\n### addListener('downloadProgress', ...)\n\n```typescript\naddListener(eventName: 'downloadProgress', listenerFunc: (event: DownloadProgressEvent) => void) => Promise<PluginListenerHandle>\n```\n\nCalled while the summarization feature is being downloaded.\n\nOnly available on Android.\n\n| Param              | Type                                                                                        |\n| ------------------ | ------------------------------------------------------------------------------------------- |\n| **`eventName`**    | <code>'downloadProgress'</code>                                                             |\n| **`listenerFunc`** | <code>(event: <a href=\"#downloadprogressevent\">DownloadProgressEvent</a>) =&gt; void</code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n**Since:** 8.2.0\n\n--------------------\n\n\n### addListener('inferenceProgress', ...)\n\n```typescript\naddListener(eventName: 'inferenceProgress', listenerFunc: (event: InferenceProgressEvent) => void) => Promise<PluginListenerHandle>\n```\n\nCalled when a new partial result is available during inference.\n\nOnly available on Android.\n\n| Param              | Type                                                                                          |\n| ------------------ | --------------------------------------------------------------------------------------------- |\n| **`eventName`**    | <code>'inferenceProgress'</code>                                                              |\n| **`listenerFunc`** | <code>(event: <a href=\"#inferenceprogressevent\">InferenceProgressEvent</a>) =&gt; void</code> |\n\n**Returns:** <code>Promise&lt;<a href=\"#pluginlistenerhandle\">PluginListenerHandle</a>&gt;</code>\n\n**Since:** 8.2.0\n\n--------------------\n\n\n### removeAllListeners()\n\n```typescript\nremoveAllListeners() => Promise<void>\n```\n\nRemove all listeners for this plugin.\n\n**Since:** 8.2.0\n\n--------------------\n\n\n### Interfaces\n\n\n#### CheckFeatureStatusResult\n\n| Prop                | Type                                                    | Description                                                   | Since |\n| ------------------- | ------------------------------------------------------- | ------------------------------------------------------------- | ----- |\n| **`featureStatus`** | <code><a href=\"#featurestatus\">FeatureStatus</a></code> | The current availability status of the summarization feature. | 8.2.0 |\n\n\n#### FeatureOptions\n\nThe feature availability depends on the configured input type,\noutput type and language. Therefore, `checkFeatureStatus(...)` and\n`downloadFeature(...)` take the same base options as `summarize(...)`.\n\n| Prop             | Type                                              | Description                     | Default                           | Since |\n| ---------------- | ------------------------------------------------- | ------------------------------- | --------------------------------- | ----- |\n| **`inputType`**  | <code><a href=\"#inputtype\">InputType</a></code>   | The type of the input text.     | <code>InputType.Article</code>    | 8.2.0 |\n| **`language`**   | <code><a href=\"#language\">Language</a></code>     | The language of the input text. | <code>Language.English</code>     | 8.2.0 |\n| **`outputType`** | <code><a href=\"#outputtype\">OutputType</a></code> | The type of the output summary. | <code>OutputType.OneBullet</code> | 8.2.0 |\n\n\n#### SummarizeResult\n\n| Prop          | Type                | Description                    | Since |\n| ------------- | ------------------- | ------------------------------ | ----- |\n| **`summary`** | <code>string</code> | The summary of the input text. | 8.2.0 |\n\n\n#### SummarizeOptions\n\n| Prop       | Type                | Description                                                                                 | Since |\n| ---------- | ------------------- | ------------------------------------------------------------------------------------------- | ----- |\n| **`text`** | <code>string</code> | The text to summarize. The input must be under 4,000 tokens (or about 3,000 English words). | 8.2.0 |\n\n\n#### PluginListenerHandle\n\n| Prop         | Type                                      |\n| ------------ | ----------------------------------------- |\n| **`remove`** | <code>() =&gt; Promise&lt;void&gt;</code> |\n\n\n#### DownloadProgressEvent\n\n| Prop                       | Type                | Description                                  | Since |\n| -------------------------- | ------------------- | -------------------------------------------- | ----- |\n| **`totalBytesDownloaded`** | <code>number</code> | The total number of bytes downloaded so far. | 8.2.0 |\n\n\n#### InferenceProgressEvent\n\n| Prop       | Type                | Description                         | Since |\n| ---------- | ------------------- | ----------------------------------- | ----- |\n| **`text`** | <code>string</code> | The new text of the partial result. | 8.2.0 |\n\n\n### Enums\n\n\n#### FeatureStatus\n\n| Members            | Value                       | Description                                                 | Since |\n| ------------------ | --------------------------- | ----------------------------------------------------------- | ----- |\n| **`Available`**    | <code>'AVAILABLE'</code>    | The feature is available to use.                            | 8.2.0 |\n| **`Downloadable`** | <code>'DOWNLOADABLE'</code> | The feature can be downloaded using `downloadFeature(...)`. | 8.2.0 |\n| **`Downloading`**  | <code>'DOWNLOADING'</code>  | The feature is currently being downloaded.                  | 8.2.0 |\n| **`Unavailable`**  | <code>'UNAVAILABLE'</code>  | The feature is not available on this device.                | 8.2.0 |\n\n\n#### InputType\n\n| Members            | Value                       | Description                                                                                       | Since |\n| ------------------ | --------------------------- | ------------------------------------------------------------------------------------------------- | ----- |\n| **`Article`**      | <code>'ARTICLE'</code>      | The input text is an article.                                                                     | 8.2.0 |\n| **`Conversation`** | <code>'CONVERSATION'</code> | The input text is a conversation where each line uses the format `&lt;name&gt;: &lt;message&gt;`. | 8.2.0 |\n\n\n#### Language\n\n| Members        | Value                   | Since |\n| -------------- | ----------------------- | ----- |\n| **`English`**  | <code>'ENGLISH'</code>  | 8.2.0 |\n| **`Japanese`** | <code>'JAPANESE'</code> | 8.2.0 |\n| **`Korean`**   | <code>'KOREAN'</code>   | 8.2.0 |\n\n\n#### OutputType\n\n| Members            | Value                        | Description                                        | Since |\n| ------------------ | ---------------------------- | -------------------------------------------------- | ----- |\n| **`OneBullet`**    | <code>'ONE_BULLET'</code>    | The summary consists of one bullet point.          | 8.2.0 |\n| **`TwoBullets`**   | <code>'TWO_BULLETS'</code>   | The summary consists of up to two bullet points.   | 8.2.0 |\n| **`ThreeBullets`** | <code>'THREE_BULLETS'</code> | The summary consists of up to three bullet points. | 8.2.0 |\n\n</docgen-api>\n\n## FAQ\n\n### What are the requirements to use this plugin?\n\nThe summarization is performed on-device by Gemini Nano. This requires a device that supports Gemini Nano, Android API level 26 or higher and a locked bootloader (see [Requirements](#requirements)). Use the `checkFeatureStatus(...)` method to check whether the feature is available on the device.\n\n### Why is this plugin only available on Android?\n\nThe ML Kit GenAI APIs are based on Gemini Nano and AICore, which are currently only available on Android. On iOS and Web, all methods reject with an appropriate error.\n\n### How large can the input text be?\n\nThe input must be under 4,000 tokens (or about 3,000 English words). For articles, the input should contain at least 400 characters for the best results.\n\n### How do I get the summary as a stream?\n\nAdd a listener for the `inferenceProgress` event before calling `summarize(...)`. The listener is called with each partial result as it is generated. The promise returned by `summarize(...)` resolves with the full result.\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- [Translation](https://capawesome.io/docs/sdks/capacitor/mlkit/translation/): Unofficial Capacitor plugin for ML Kit Translation.\n- [Smart Reply](https://capawesome.io/docs/sdks/capacitor/mlkit/smart-reply/): Unofficial Capacitor plugin for ML Kit Smart Reply.\n- [GenAI Proofreading](https://capawesome.io/docs/sdks/capacitor/mlkit/genai-proofreading/): Proofread text before or after summarizing it.\n\n## Terms & Privacy\n\nThis plugin uses the [Google ML Kit](https://developers.google.com/ml-kit):\n\n- [Terms & Privacy](https://developers.google.com/ml-kit/terms)\n- [Android Data Disclosure](https://developers.google.com/ml-kit/android-data-disclosure)\n- [iOS Data Disclosure](https://developers.google.com/ml-kit/ios-data-disclosure)\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-mlkit/blob/main/packages/genai-summarization/CHANGELOG.md).\n\n## License\n\nSee [LICENSE](https://github.com/capawesome-team/capacitor-mlkit/blob/main/packages/genai-summarization/LICENSE).\n\n[^1]: This project is not affiliated with, endorsed by, sponsored by, or approved by Google LLC or any of their affiliates or subsidiaries.\n","readmeFilename":"README.md"}