Privacy Manager for the Flutter Plugin
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 Flag | Features |
|---|---|
push | Push notifications |
in_app_automation | In-App Automation, In-App Messages, Scenes, and Landing Pages |
message_center | Message Center |
tags_and_attributes | Tags, Attributes, Subscription Lists, and Preference Center |
contacts | Contact Tags, Attributes, and Subscription Lists; Named User; and Associated Channels |
analytics | Associated identifiers, Custom events, Screen tracking, Surveys, email address, Feature Flag interaction |
feature_flags | Feature Flag evaluation and interaction |
all | All features |
none | No features |
Configuring default enabled features
You can configure which features are enabled by default when the SDK initializes. This is done in your Airship config during takeOff. For information about setting up the Airship SDK and configuring AirshipConfig, see Flutter SDK Setup.
Default configuration (all features enabled)
By default, all features are enabled. The SDK will collect data and make network requests as configured.
Disabling all features
To disable all features by default (useful for consent opt-in flows), set the enabled features to an empty array:
Airship.takeOff(
AirshipConfig(
defaultEnvironment: ConfigEnvironment(
enabledFeatures: []
)
)
);Enabling specific features
To enable only specific features by default:
Airship.takeOff(
AirshipConfig(
defaultEnvironment: ConfigEnvironment(
enabledFeatures: ["push", "analytics"]
)
)
);Modifying enabled features at runtime
You can enable or disable features at any time after takeOff. Once you modify the enabled features from the default, those settings are persisted between app launches.
Enabling features
Airship.privacyManager.enableFeatures(["push", "analytics"]);Disabling features
Airship.privacyManager.disableFeatures(["push", "analytics"]);Consent opt-in flow example
A common use case is to start with all features disabled, then enable them as users grant consent:
// Start with all features disabled
Airship.takeOff(
AirshipConfig(
defaultEnvironment: ConfigEnvironment(
enabledFeatures: []
)
)
);
// Later, when user grants consent:
void userGrantedConsent() {
// Enable features based on user's consent choices
Airship.privacyManager.enableFeatures(["push", "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
- Apple Privacy Manifest - Declare data collection practices to Apple (iOS)
- Google Play Data Safety - Reference for Google Play’s Data Safety section (Android)
- Analytics - Track user engagement with custom events, screen tracking, and associated identifiers
Categories