@capgo/capacitor-android-age-signals

中文文档
8.1.30发布于 2026/11/09MPL-2.0TypeScriptESM + CJS零依赖构建来源已验证近 30 天下载 4.1万

Capacitor plugin that exposes Google Play Age Signals to your app.

原始使用文档
文档目录12 节
  1. ➡️ Get started for free
  2. Key features
  3. Why Android Age Signals?
  4. Documentation
  5. Compatibility
  6. Install
  7. Usage
  8. API
  9. checkAgeSignals()
  10. getPluginVersion()
  11. Interfaces
  12. Enums

@capgo/capacitor-android-age-signals

Read Google Play Age Signals from your Capacitor app to detect supervised accounts, guardian approvals and verified users. A small Android-only bridge for age assurance flows.

Capgo - Build Capacitor apps with AI, ship updates instantly

Capgo: push fixes to your Capacitor users in minutes, build signed iOS and Android apps without a Mac, and roll back in one click.

➡️ Get started for free

14-day unlimited free trial. No credit card required

🤖 Building with an AI coding agent? Install Capgo skills so Claude Code, Codex, Cursor, Copilot, or Gemini CLI know how to install and use @capgo/capacitor-android-age-signals in your Capacitor app: npx skills add Cap-go/capgo-skills. Then ask your agent: "Add @capgo/capacitor-android-age-signals to my Capacitor app and wire it up." Agent setup guides · Hosted MCP

@capgo/capacitor-android-age-signals for Capacitor apps

Key features

  • One call: checkAgeSignals() requests the current Play Age Signals for the active user.
  • Supervised accounts: tells you when the user is on a supervised account and whether a guardian approved.
  • Verified users: reports when Google Play verified the user's age.
  • Official library: uses the Google Play age-signals library.
  • Platforms: Android. Android only. iOS and web are not supported (see capacitor-age-range for both platforms).

Why Android Age Signals?

The only free Capacitor plugin for Google Play's Age Signals API. Implement COPPA and teen safety compliance with:

  • Supervised account detection - Identify users with parental controls
  • Age verification - Detect 18+ verified users
  • Guardian approval tracking - Monitor pending approvals and denials
  • Compliant features - Build age-appropriate experiences and comply with regulations
  • Same JavaScript API - Compatible interface with paid alternatives

Critical for apps targeting families, children, and teens who need age-gate functionality.

Documentation

Authoritative docs live inside this repo for now. Explore the TypeScript definitions in src/definitions.ts and the Android implementation under android/ for platform behavior. Run the included example app for an end-to-end walkthrough.

Compatibility

Plugin versionCapacitor compatibilityMaintained
v8.*.*v8.*.*✅
v7.*.*v7.*.*On demand
v6.*.*v6.*.*❌
v5.*.*v5.*.*❌

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.

Install

You can use our AI-Assisted Setup to install the plugin. Add the Capgo skills to your AI tool using the following command:

npx skills add https://github.com/cap-go/capacitor-skills --skill capacitor-plugins

Then use the following prompt:

Use the `capacitor-plugins` skill from `cap-go/capacitor-skills` to install the `@capgo/capacitor-android-age-signals` plugin in my project.

If you prefer Manual Setup, install the plugin by running the following commands and follow the platform-specific instructions below:

npm install @capgo/capacitor-android-age-signals
npx cap sync android

Google Play Age Signals is available only on Android phones with the Play Store installed.

Usage

import { AgeSignals } from '@capgo/capacitor-android-age-signals';
import { UserStatus } from '@capgo/capacitor-android-age-signals';

const result = await AgeSignals.checkAgeSignals();

if (result.userStatus === UserStatus.Supervised) {
  console.info(`Supervised user aged between ${result.ageLower} and ${result.ageUpper}`);
} else if (result.userStatus === UserStatus.Verified) {
  console.info('User is 18+ and verified by Google.');
} else {
  console.warn('No definitive age signal returned.');
}

API

Capacitor interface for retrieving Play Age Signals.

checkAgeSignals()

checkAgeSignals() => Promise<CheckAgeSignalsResult>

Request the current Play Age Signals for the active user.

Only available on Android devices with Google Play installed.

Returns: Promise<CheckAgeSignalsResult>

Since: 0.0.1


getPluginVersion()

getPluginVersion() => Promise<{ version: string; }>

Get the native Capacitor plugin version.

Returns: Promise<{ version: string; }>

Since: 1.0.0


Interfaces

CheckAgeSignalsResult

Structured result returned by {@link AgeSignalsPlugin.checkAgeSignals}.

PropTypeDescriptionSince
userStatusUserStatusThe user's verification status as reported by Google Play.0.0.1
ageLowernumberInclusive lower bound of the supervised user's age range. Present only when userStatus is SUPERVISED, SUPERVISED_APPROVAL_PENDING, or SUPERVISED_APPROVAL_DENIED.0.0.1
ageUppernumberInclusive upper bound of the supervised user's age range. Present only when userStatus is SUPERVISED, SUPERVISED_APPROVAL_PENDING, or SUPERVISED_APPROVAL_DENIED and the user's age is reported as less than 18.0.0.1
mostRecentApprovalDatestringEffective date for the most recent significant change that received guardian approval. Present only when userStatus is SUPERVISED_APPROVAL_PENDING or SUPERVISED_APPROVAL_DENIED.0.0.1
installIdstringIdentifier assigned to supervised installs in Google Play for revocation notifications. Present only when userStatus is SUPERVISED, SUPERVISED_APPROVAL_PENDING, or SUPERVISED_APPROVAL_DENIED.0.0.1

Enums

UserStatus

MembersValueDescriptionSince
Verified'VERIFIED'The user is over 18 and their age has been verified by Google.0.0.1
Supervised'SUPERVISED'The user has a supervised Google Account managed by a guardian. Use ageLower and ageUpper to determine the user's age range.0.0.1
SupervisedApprovalPending'SUPERVISED_APPROVAL_PENDING'The supervised user has pending significant changes awaiting guardian approval. Use ageLower and ageUpper to determine the user's age range and mostRecentApprovalDate to identify the most recent approved change.0.0.1
SupervisedApprovalDenied'SUPERVISED_APPROVAL_DENIED'The supervised user's guardian denied one or more significant changes. Use ageLower and ageUpper to determine the user's age range and mostRecentApprovalDate to identify the last approved change.0.0.1
Unknown'UNKNOWN'The user is not verified or supervised in supported regions. You should prompt the user to resolve their status in the Play Store.0.0.1
Empty'EMPTY'All other users return this value.0.0.1

版本与发布记录

@capgo/capacitor-android-age-signals 共发布 31 个版本,首次发布于 2025/10/27;过去 12 个月发布了 30 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
8.1.30latest2026/11/09今天
8.1.292026/11/026 天前
8.1.282026/10/2613 天前
8.1.272026/10/1920 天前
8.1.262026/10/1525 天前
8.1.252026/10/1327 天前

关于 @capgo/capacitor-android-age-signals 的常见问题

@capgo/capacitor-android-age-signals 是什么?

Capacitor plugin that exposes Google Play Age Signals to your app.

如何安装 @capgo/capacitor-android-age-signals?

在项目目录运行 npm install @capgo/capacitor-android-age-signals,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@capacitor/core(>=8.0.0)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@capgo/capacitor-android-age-signals 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@capgo/capacitor-android-age-signals 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@capgo/capacitor-android-age-signals 可以商用吗?

@capgo/capacitor-android-age-signals 使用 MPL-2.0 许可。弱 Copyleft:可以商用,也可以和闭源代码一起使用;但如果分发时修改了 MPL 授权的文件,这些文件的修改需以 MPL 开源。以上为概括,不构成法律意见,请以许可原文为准。

@capgo/capacitor-android-age-signals 的下载量有多少?

根据 npm 官方下载统计,@capgo/capacitor-android-age-signals 在 2026/10/09 – 2026/11/07 这 30 天内被下载 41,072 次,日均约 1,369 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@capgo/capacitor-android-age-signals 还在维护吗?

最新版本 8.1.30 发布于 2026/11/09(今天);至今共发布 31 个版本,其中过去 12 个月发布了 30 个;首次发布于 2025/10/27。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。