Skip to content
Consent Management
Guides
Mobile SDK
Minor Age Signal

Apply the minor age signal in mobile apps

20minAstralisMobile Consent
This feature applies only to mobile apps that use the Astralis mobile SDK. Websites that run FidesJS in a browser aren't affected. It requires Astralis 3.3.0 or later and the SDK at iOS 1.4.2, Android 1.4.2, Flutter 0.6.0 or React Native 0.2.0, or later.

The Astralis mobile SDK's minor age signal opts users under 16 out of the sale and sharing of their personal information, including targeted advertising, as soon as the app knows the user's age bracket.

From 2027, California's Digital Age Assurance Act (AB 1043) has app stores tell each app the age bracket of its user, and Texas, Utah and Louisiana have similar laws. Once an app has that signal, the California Consumer Privacy Act (CCPA) treats it as knowing the user's age, so it may not sell or share the data of a user under 16 without opt-in. The SDK applies this rule for you: when the bracket is under 16, it opts every targeted-ads notice out before it shows a privacy experience or reports consent to your app.

This guide walks through choosing the notices the rule covers, giving the SDK the age bracket, and recording a parent's consent. The SDK's classes and packages use the name Janus, as in JanusConfiguration.

ℹ️
This guide describes how Astralis behaves. It isn't legal advice. Work with your legal team to decide which notices and users the age signal should cover.

How it works

The SDK works with five age brackets, which follow AB 1043: under 13, 13 to 15, 16 to 17, adult and unknown. Only the two brackets under 16 count as minors:

BracketOpted out automaticallyToggle in the privacy experienceAccept AllTurning a notice back on
Under 13YesLocked while offLeaves these notices offOnly your app, by recording a parent's consent
13 to 15YesUnlockedLeaves these notices offThe user switches the notice on themselves
16 to 17, adult, unknownNoNormalNormalNot needed
  • The rule covers your targeted-ads notices. The SDK treats a privacy notice as a targeted-ads notice when it has the Global Privacy Control (GPC) flag and isn't notice-only. In California, a GPC-flagged notice already covers the sale or sharing of personal information, which is exactly what the CCPA restricts for minors.
  • The SDK opts each notice out once. The first time a minor bracket meets a notice, the SDK turns it off, even if it was on, and saves the change to Astralis with the consent method age_signal. After that, the SDK leaves the notice alone, so a 13 to 15 year old who switches it back on keeps that choice across launches.
  • Accept All never opts a minor in. For both minor brackets, Accept All leaves these notices at their current value. Turning one on always takes a deliberate choice for that one notice.
  • Under 13, only a parent can opt in. The notice's toggle stays locked while it's off. Your app records a parent's consent with the consent method parental_consent, and the SDK saves it to Astralis. A notice a parent turned on stays on through Accept All, and the child can still turn it off; turning it on again needs the parent again.

For what happens when the bracket changes, and what Astralis stores, see Runtime behavior.

Step 1: Mark your targeted-ads notices with the GPC flag

The rule uses the GPC flag your notices already have for the CCPA, so most setups need no change. To check a notice:

  1. Navigate to Consent → Notices and select the notice.
  2. Confirm that Conforms to Global Privacy Control (GPC) is on for every notice that covers the sale or sharing of personal information or targeted advertising.
  3. Click Save.

For more on the GPC flag, see Configure GPC.

Step 2: Give the SDK the age bracket

The SDK takes the bracket from one of two sources. When both are present, the bracket from your app wins, because your app can know more, such as a verified age.

Read the age range from the app store

Set enableAgeSignal to true, and the SDK asks the platform for the user's age range during initialize, before it shows the privacy experience: Apple's Declared Age Range API on iOS 26 or later, and Google Play Age Signals on Android.

iOS:

let config = JanusConfiguration(
    apiHost: "https://privacy.example.com",
    propertyId: "FDS-A0B1C2",
    enableAgeSignal: true
)

Android:

val config = JanusConfiguration.Builder()
    .apiHost("https://privacy.example.com")
    .propertyId("FDS-A0B1C2")
    .enableAgeSignal(true)
    .build()

Flutter:

final config = JanusConfiguration(
  apiHost: 'https://privacy.example.com',
  propertyId: 'FDS-A0B1C2',
  enableAgeSignal: true,
);

React Native:

await Janus.initialize({
  apiHost: "https://privacy.example.com",
  propertyId: "FDS-A0B1C2",
  enableAgeSignal: true,
});

Each platform needs one addition to your app:

  • iOS: the Declared Age Range entitlement. Add the capability in Xcode, or add the key to your app's entitlements file. In an Expo app, set the config plugin's enableAgeSignal option instead.

    <key>com.apple.developer.declared-age-range</key>
    <true/>
  • Android: the Play Age Signals library, which needs minSdk 23. The SDK doesn't pull it in, so apps that don't use the age signal don't carry it. In an Expo app, the config plugin's enableAgeSignal option adds it.

    dependencies {
        implementation("com.google.android.play:age-signals:0.0.4")
    }

The SDK waits for the platform's answer before it shows the privacy experience:

SituationHow long the SDK waits
No age prompt is on screenUp to 5 seconds
The platform's age prompt is on screenUntil the user answers, for up to a minute
The prompt has just closedAnother 5 seconds for the answer

An answer that arrives later is still applied, including to an open privacy experience.

The bracket is unknown in any of these cases. The SDK then treats the user as it treats an adult, and initialization completes normally:

  • The platform fails or times out.
  • The user declines to share.
  • The device runs iOS 25 or earlier.
  • An iOS app is missing the Declared Age Range entitlement.
  • An Android app doesn't include the Play Age Signals library.

On iOS, the system shows its own age-sharing sheet over your top-most screen:

  • No screen yet: if no screen is visible when you call initialize, the SDK asks once the app becomes active or when you show the privacy experience. It asks at most once per launch.
  • Privacy experience: showing the experience always waits for the answer.
  • initialize completion: it waits too, but if no screen appears within 5 seconds, for example on a launch in the background, it completes with the bracket still pending. The SDK applies the answer when it arrives.
  • App Tracking Transparency (ATT): with enableATT on, the SDK requests tracking permission only after the user answers the age sheet and the app is active, so the two system prompts never overlap.
  • Older iOS: the SDK uses the API only on iOS 26 or later, so your app still runs on iOS 15 to 25, where the bracket is unknown.

Pass the bracket your app already knows

If your app already requests the user's age range, for example for its own content rules, pass the result to the SDK. The user then doesn't see a second system prompt.

iOS:

let config = JanusConfiguration(
    apiHost: "https://privacy.example.com",
    propertyId: "FDS-A0B1C2",
    ageBracket: .age13To15
)
 
// Or later, when your app learns the bracket
Janus.setAgeSignal(.age13To15)

Android:

val config = JanusConfiguration.Builder()
    .apiHost("https://privacy.example.com")
    .propertyId("FDS-A0B1C2")
    .ageBracket(AgeBracket.AGE_13_TO_15)
    .build()
 
// Or later, when your app learns the bracket
Janus.setAgeSignal(AgeBracket.AGE_13_TO_15)

Flutter:

final config = JanusConfiguration(
  apiHost: 'https://privacy.example.com',
  propertyId: 'FDS-A0B1C2',
  ageBracket: AgeBracket.age13To15,
);
 
// Or later, when your app learns the bracket
await janus.setAgeSignal(AgeBracket.age13To15);

React Native:

import { AgeBracket, Janus } from "@ethyca/janus-sdk-react-native";
 
await Janus.initialize({
  apiHost: "https://privacy.example.com",
  propertyId: "FDS-A0B1C2",
  ageBracket: AgeBracket.age13To15,
});
 
// Or later, when your app learns the bracket
await Janus.setAgeSignal(AgeBracket.age13To15);

Passing the unknown bracket hands the decision back to the app store's age range, when enableAgeSignal is on.

⚠️
A bracket you pass after initialize can arrive after the privacy experience has shown and after your ad SDKs have read consent. In that case, turn off autoShowExperience, call setAgeSignal as soon as you know the bracket, and only then show the privacy experience and start your ad SDKs.

Step 3: Record a parent's consent for a child under 13

For a child under 13, a targeted-ads notice can only be turned on by your app, after your app has verified that a parent gave consent. The SDK doesn't check who gave it; that check is your app's job. Record the parent's choice with the parental consent method:

iOS:

Janus.setConsent(
    values: ["data_sales_and_sharing": true],
    consentMethod: .parentalConsent,
    saveToFides: true
)

Android:

Janus.setConsent(
    values = mapOf("data_sales_and_sharing" to true),
    consentMethod = ConsentMethod.PARENTAL_CONSENT,
    saveToFides = true
)

Flutter:

await janus.setConsent(
  values: {'data_sales_and_sharing': true},
  consentMethod: ConsentMethod.parentalConsent,
  saveToFides: true,
);

React Native:

await Janus.setConsent({
  values: { data_sales_and_sharing: true },
  consentMethod: ConsentMethod.parentalConsent,
  saveToFides: true,
});

Every other way of turning the notice on keeps it off for a child under 13: the toggle in the privacy experience, Accept All, a web page's FidesJS, and setConsent with any other method. If App Tracking Transparency (ATT) is on and the user denied tracking, the ATT lock still applies as well.

Step 4: Check web pages in your app

Web pages that run FidesJS in your app get the same rules, once FidesJS has the bracket as its fides_age_signal option. FidesJS then starts the restricted notices off and keeps Accept All and the page's own scripts from turning them on.

Web viewHow it gets the bracketWhat you do
The SDK's own web views, including the IAB Transparency and Consent Framework (TCF) experience and web views from createConsentWebView()The SDK passes itNothing
React Native pages shown with useJanusWebViewThe SDK passes itNothing
Your own web viewsYour app passes itSet fides_age_signal in window.fides_overrides before FidesJS loads, and update it when the SDK sends the ageSignalUpdated event

For your own web views, read the bracket from:

  • iOS and Android: Janus.webViewAgeSignal.
  • React Native: ageSignal in Janus.webViewConsent.
  • Flutter: the SDK doesn't expose the bracket, so show pages through the SDK's own web views.
⚠️
The bracket reaches FidesJS through window.fides_overrides, so any script on the page can read it. Don't load third-party tags that read fides_overrides on pages you show in your app.

Web view details

  • The SDK checks consent that a page sends back. For either minor bracket, a page can only turn on a restricted notice through the user's own choice in the FidesJS modal, so a page running an older FidesJS can't get around the rule. When the SDK turns a page's opt-in back off, it saves the correction to Astralis with the age_signal method, under the page's own device ID.
  • On Android, the androidx.webkit library is optional. With it in your app, the SDK gives a page the bracket before the page's own scripts run. Without it, the SDK gives the bracket once the page has loaded and re-initializes FidesJS, so the page briefly starts without it. Either way, the SDK applies the same checks to consent the page sends back.
  • Page scripts should listen for JanusUnsavedConsentApplied. This applies to the SDK's own web views and React Native pages shown with useJanusWebView. When the user hasn't saved a choice, the SDK applies an opt-out that arrives while the page is open without saving it, so FidesJS doesn't fire FidesUpdated. The JanusUnsavedConsentApplied window event fires instead, with the page's consent in event.detail.consent. A bracket change also re-initializes FidesJS, which fires FidesInitialized.
  • Ad tags should read Fides.consent, not __gpp. An opt-out that reaches a page that's already open is applied in memory, so it isn't in the page's Global Privacy Platform (GPP) string. Ad tags in your app's web pages should decide whether they may run from Fides.consent (or the SDK's consent values).

Step 5: Verify the opt-outs

  1. Initialize the SDK with the under-13 bracket, for example through ageBracket, in a region whose experience has GPC-flagged notices.
  2. Open the privacy experience. The GPC-flagged notices are off and their toggles are locked.
  3. Select Accept All. The other notices turn on, and the GPC-flagged notices stay off.
  4. Record a parent's consent for one notice, as in Step 3, and open the experience again. That notice is now on.
  5. In Astralis, navigate to Consent → Consent report, and select the Consent records tab if the report shows tabs. The opt-outs show the Age Signal method, and the parent's opt-in shows Parental Consent.

Runtime behavior

  • The opt-out isn't the user's choice. It doesn't change the consent timestamps or method, so the privacy experience still shows when it otherwise would.
  • The signal only ever turns consent off. When the bracket moves to 16 or older, the toggles unlock, but the SDK doesn't turn anything back on. When the bracket drops to under 13, the SDK turns off any targeted-ads notice that is on without a parent's consent.
  • The bracket stays on the device. The SDK keeps it in memory only. It never stores it, never sends it to Astralis and never logs it. Astralis sees only the age_signal and parental_consent consent methods on the saved preferences.

Troubleshoot the age signal

  • The consent report doesn't show the Age Signal or Parental Consent method. Check that you're on Astralis 3.3.0 or later. On an older Astralis, the SDK still opts minors out on the device, but it saves the opt-out without its consent method, so the consent report can't show why the notice changed. Also check that saveUserPreferencesToFides is on, which is the default. With it off, the SDK saves nothing to Astralis, so the opt-out applies on the device but doesn't reach the consent report.
  • Web pages in your app don't apply the bracket. On an older Astralis, FidesJS in your web views doesn't apply the bracket itself. On a current one, check that your own web views pass the bracket, as in Step 4.
  • The bracket stays unknown. Check the causes listed under Read the age range from the app store, such as a missing entitlement or Play library.

Related