Skip to main content
Beta API noticeThe underlying platform APIs are currently in beta. During the beta period, Play Age Signals may return API_NOT_AVAILABLE or throw exceptions on some devices. Always handle these cases gracefully and provide conservative fallbacks for age-gated flows.
AgeSafety exposes system-provided age signals and supervision state so you can determine whether a user is a minor, whether their account is supervised (Family Link / Screen Time), and whether parental approval is required for significant app changes or feature enablement. The plugin intentionally passes through platform signals (it does not collect or send identifiable data itself). Use the plugin to gate UI, require parental confirmation, or disable features for underage users.

Why use AgeSafety?

  • Compliance made simple: Meet platform requirements for age-appropriate content
  • User safety first: Protect minors with proper age verification
  • Parental controls: Respect existing family supervision settings
  • Unified approach: One API works across both Android and iOS platforms

Key terms

The following terms will help you implement AgeSafety: Age bounds: Platforms return age ranges (like 13–17) rather than exact ages. Both bounds are inclusive, meaning a user with bounds 13–17 could be 13, 17, or anywhere in between. Strong verification: High-confidence signals from payment verification or government ID checks. Weak verification: Self-declared ages or other lower-confidence methods. Supervised account: The user’s device or account is under parental supervision (Family Link on Android, Screen Time on iOS). Supervisor approval required: The platform indicates that significant app changes need parent/guardian approval.

Privacy and security

  • The plugin surfaces system-provided signals only. It does not log or transmit personally-identifying information.
  • Follow platform rules: you may only use information from the Play Age Signals API to provide age-appropriate content and experiences in compliance with laws. You may not use the Play Age Signals API for any other purpose including, but not limited to, advertising, marketing, user profiling, or analytics.

Implementation guide

App setup

Enable the AgeSafety plugin in Median App Studio before calling any JavaScript Bridge functions. Navigate to your app’s plugin settings and toggle AgeSafety on.

JavaScript Bridge guide

Core methods

getAgeSignals
Retrieve age and supervision signals from the platform.
Return value (resolved Promise/success callback) is an AgeSignalsResponse.
requireMinimumAge
A convenience helper that checks whether the user meets a numeric minimum age.
AgeRequirementResponse.allowed is computed as ageLowerBound >= requiredAge when age bounds are available. If bounds are missing, allowed may be false, and an app-level conservative policy should apply.

Implementation example: gate a purchase flow

This example verifies a user’s age before allowing a purchase, routes supervised accounts to a parental-approval flow, and falls back conservatively when signals are unavailable.
For more on JavaScript Bridge fundamentals used above, see Basic Usage and Using Listeners.

Error handling

Testing checklist

Use this checklist to confirm AgeSafety is working correctly in your app:
  • getAgeSignals returns a valid response object on a supported device
  • requireMinimumAge returns allowed: true for users above the threshold
  • requireMinimumAge returns allowed: false for users below the threshold
  • Age signals return correctly on Android devices
  • Age signals return correctly on iOS devices
  • verificationMethod is present on iOS responses
  • Supervised-account detection works correctly on Family Link / Screen Time devices
  • NOT_SUPPORTED is handled gracefully with a conservative fallback
  • API_ERROR is caught and the app applies a conservative default
  • Missing ageLowerBound / ageUpperBound is handled gracefully when signals return UNKNOWN

Troubleshooting

AgeSafety functions are undefined or not working

Ensure the JavaScript Bridge is enabled in Median App Studio and that you’re calling the functions after the median_library_ready() event. Also verify that the plugin is enabled in your app configuration.

getAgeSignals always throws an error on some Android devices

During the beta period, Play Age Signals may return API_NOT_AVAILABLE or throw exceptions on some devices. Always wrap calls in a try/catch block and provide a conservative fallback for age-gated flows when signals are unavailable.

requireMinimumAge returns allowed: false even for adult users

If ageLowerBound is missing from the response (signals returned UNKNOWN), allowed will be false. This is expected behavior. Design your UI to apply a conservative default when verification is not available, and provide an alternative flow if needed.
Last modified on December 3, 2026