Privacy Manager

Use Privacy Manager to enable or disable Airship SDK features for privacy and consent management.

View as Markdown

Privacy Manager allows you to control which Airship SDK features are enabled. This is particularly useful for consent opt-in flows where you need to disable all features initially, then enable them as users grant consent. For information about what data is collected for each Privacy Manager flag, see SDK Data Collection.

When all features are disabled, the SDK operates in a no-op mode—it doesn’t store data or make network requests. Once features are enabled, you can enable or disable specific features at runtime based on user consent.

Privacy Manager flags

Each Privacy Manager flag controls a group of related Airship features. Enabling a flag enables all features within that group:

Privacy Manager flags

Privacy Manager FlagKotlin ConstantFeaturesAirshipConfig Value
PushPrivacyManager.Feature.PUSHPush notificationspush
In-App AutomationPrivacyManager.Feature.IN_APP_AUTOMATIONIn-App Automation, In-App Messages, Scenes, and Landing Pagesin_app_automation
Message CenterPrivacyManager.Feature.MESSAGE_CENTERMessage Centermessage_center
Tags and AttributesPrivacyManager.Feature.TAGS_AND_ATTRIBUTESTags, Attributes, Subscription Lists, and Preference Centertags_and_attributes
ContactsPrivacyManager.Feature.CONTACTSContact Tags, Attributes, and Subscription Lists; Named User; and Associated Channelscontacts
Feature FlagsPrivacyManager.Feature.FEATURE_FLAGSFeature flag evaluation and interactionfeature_flags
AnalyticsPrivacyManager.Feature.ANALYTICSAssociated identifiers, Custom events, Screen tracking, Surveys (questions and NPS surveys in ScenesA mobile app or web experience of one or more screens displayed with fully native UI components in real time, providing immediate, contextual responses to user behaviors. Scenes can be presented in full-screen, modal, or embedded format using the default swipe/click mode or as a story. Scene content can also be displayed in a Message Center message and contain survey questions.), email address (via form inputs in Scenes), feature flagAn experimentation tool for controlling the availability of content or functionality in your app or website. A flag’s Configurations determine the audience, schedule, and property values to apply when the flag is enabled. Flag properties enable making immediate code updates, bypassing the need for traditional code changes and release processes. interactionanalytics
On-Device AIPrivacyManager.Feature.ON_DEVICE_AIOn-Device AI evaluations, including Embedded Content AI selection Android SDK 21+on_device_ai
AllPrivacyManager.Feature.ALLAll featuresall
NonePrivacyManager.Feature.NONENo featuresnone
Privacy Manager FlagJava ConstantFeaturesAirshipConfig Value
PushPrivacyManager.Feature.PUSHPush notificationspush
In-App AutomationPrivacyManager.Feature.IN_APP_AUTOMATIONIn-App Automation, In-App Messages, Scenes, and Landing Pagesin_app_automation
Message CenterPrivacyManager.Feature.MESSAGE_CENTERMessage Centermessage_center
Tags and AttributesPrivacyManager.Feature.TAGS_AND_ATTRIBUTESTags, Attributes, Subscription Lists, and Preference Centertags_and_attributes
ContactsPrivacyManager.Feature.CONTACTSContact Tags, Attributes, and Subscription Lists; Named User; and Associated Channelscontacts
Feature FlagsPrivacyManager.Feature.FEATURE_FLAGSFeature flag evaluation and interactionfeature_flags
AnalyticsPrivacyManager.Feature.ANALYTICSAssociated identifiers, Custom events, Screen tracking, Surveys (questions and NPS surveys in ScenesA mobile app or web experience of one or more screens displayed with fully native UI components in real time, providing immediate, contextual responses to user behaviors. Scenes can be presented in full-screen, modal, or embedded format using the default swipe/click mode or as a story. Scene content can also be displayed in a Message Center message and contain survey questions.), email address (via form inputs in Scenes), feature flagAn experimentation tool for controlling the availability of content or functionality in your app or website. A flag’s Configurations determine the audience, schedule, and property values to apply when the flag is enabled. Flag properties enable making immediate code updates, bypassing the need for traditional code changes and release processes. interactionanalytics
On-Device AIPrivacyManager.Feature.ON_DEVICE_AIOn-Device AI evaluations, including Embedded Content AI selection Android SDK 21+on_device_ai
AllPrivacyManager.Feature.ALLAll featuresall
NonePrivacyManager.Feature.NONENo featuresnone

Configuring default enabled features

Default enabled features can be set in the Airship Config options passed to takeOff during SDK initialization. For information about setting up the Airship SDK and configuring AirshipConfigOptions, see Android SDK Setup.

Setting default features

AirshipConfigOptions
airshipConfigOptions {
    // ...
    setEnabledFeatures(PrivacyManager.Feature.PUSH)
}
airshipconfig.properties
enabledFeatures = push
AirshipConfigOptions
AirshipConfigOptions.newBuilder()
    // ...
    .setEnabledFeatures(PrivacyManager.Feature.PUSH)
    .build();
airshipconfig.properties
enabledFeatures = push

To fully disable data collection by default, set the enabled features to none.

Disabling all features

AirshipConfigOptions
airshipConfigOptions {
  // ...
  setEnabledFeatures(PrivacyManager.Feature.NONE)
}
airshipconfig.properties
enabledFeatures = none
AirshipConfigOptions
AirshipConfigOptions.newBuilder()
    // ...
    .setEnabledFeatures(PrivacyManager.Feature.NONE)
    .build();
airshipconfig.properties
enabledFeatures = none

Enabling features at runtime

You can enable or disable features at runtime based on user consent:

Enabling features at runtime

// Initially disable all features
val options = airshipConfigOptions {
    // ...
    setEnabledFeatures(PrivacyManager.Feature.NONE)
}

// Later, when user grants consent:
Airship.privacyManager.enable(
    PrivacyManager.Feature.PUSH,
    PrivacyManager.Feature.ANALYTICS
)
// Initially disable all features
AirshipConfigOptions options = AirshipConfigOptions.newBuilder()
    // ...
    .setEnabledFeatures(PrivacyManager.Feature.NONE)
    .build();

// Later, when user grants consent:
Airship.getPrivacyManager().enable(
    PrivacyManager.Feature.PUSH,
    PrivacyManager.Feature.ANALYTICS
);
Note

If features are disabled after being previously enabled, the SDK may make a few network requests to opt the channel out to prevent notifications.

Checking enabled features

Check which features are currently enabled, or listen for changes driven by your own code or by remote config:

Checking enabled features

// Check if a feature is enabled
val analyticsEnabled = Airship.privacyManager.isEnabled(PrivacyManager.Feature.ANALYTICS)

// Check if any of the given features are enabled
val eitherEnabled = Airship.privacyManager.isAnyEnabled(
    PrivacyManager.Feature.PUSH,
    PrivacyManager.Feature.ANALYTICS
)

// Listen for changes
scope.launch {
    Airship.privacyManager.featureUpdates.collect { updatedFeatures ->
        Log.d("Airship", "Enabled features changed: $updatedFeatures")
    }
}
// Check if a feature is enabled
boolean analyticsEnabled = Airship.getPrivacyManager().isEnabled(PrivacyManager.Feature.ANALYTICS);

// Check if any of the given features are enabled
boolean eitherEnabled = Airship.getPrivacyManager().isAnyEnabled(
    PrivacyManager.Feature.PUSH,
    PrivacyManager.Feature.ANALYTICS
);
Note

Listening for changes with featureUpdates is Kotlin only, since it’s a Flow.

  • SDK Data Collection - Comprehensive overview of what data Airship collects for each Privacy Manager flag
  • Google Play Data Safety - Reference for Google Play’s Data Safety section
  • Analytics - Track user engagement with custom events, screen tracking, and associated identifiers