Privacy Manager for the Android SDK
Use Privacy Manager to enable or disable Airship SDK features for privacy and consent management.
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 Flag | Kotlin Constant | AirshipConfig Value |
|---|---|---|
| Push | PrivacyManager.Feature.PUSH | push |
| In-App Automation | PrivacyManager.Feature.IN_APP_AUTOMATION | in_app_automation |
| Message Center | PrivacyManager.Feature.MESSAGE_CENTER | message_center |
| Tags and Attributes | PrivacyManager.Feature.TAGS_AND_ATTRIBUTES | tags_and_attributes |
| Contacts | PrivacyManager.Feature.CONTACTS | contacts |
| Feature Flags | PrivacyManager.Feature.FEATURE_FLAGS | feature_flags |
| Analytics | PrivacyManager.Feature.ANALYTICS | analytics |
| All | PrivacyManager.Feature.ALL | all |
| None | PrivacyManager.Feature.NONE | none |
| Privacy Manager Flag | Java Constant | AirshipConfig Value |
|---|---|---|
| Push | PrivacyManager.Feature.PUSH | push |
| In-App Automation | PrivacyManager.Feature.IN_APP_AUTOMATION | in_app_automation |
| Message Center | PrivacyManager.Feature.MESSAGE_CENTER | message_center |
| Tags and Attributes | PrivacyManager.Feature.TAGS_AND_ATTRIBUTES | tags_and_attributes |
| Contacts | PrivacyManager.Feature.CONTACTS | contacts |
| Feature Flags | PrivacyManager.Feature.FEATURE_FLAGS | feature_flags |
| Analytics | PrivacyManager.Feature.ANALYTICS | analytics |
| All | PrivacyManager.Feature.ALL | all |
| None | PrivacyManager.Feature.NONE | none |
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 {
// ...
setEnabledFeatures(PrivacyManager.Feature.PUSH)
}enabledFeatures = pushAirshipConfigOptions.newBuilder()
// ...
.setEnabledFeatures(PrivacyManager.Feature.PUSH)
.build();enabledFeatures = pushTo fully disable data collection by default, set the enabled features to none.
Disabling all features
airshipConfigOptions {
// ...
setEnabledFeatures(PrivacyManager.Feature.NONE)
}enabledFeatures = noneAirshipConfigOptions.newBuilder()
// ...
.setEnabledFeatures(PrivacyManager.Feature.NONE)
.build();enabledFeatures = noneEnabling 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.enableFeatures(
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().enableFeatures(
PrivacyManager.Feature.PUSH,
PrivacyManager.Feature.ANALYTICS
);If features are disabled after being previously enabled, the SDK may make a few network requests to opt the channel out to prevent notifications.
Related documentation
- 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
Categories