Overview
The User Messaging Platform (UMP) SDK helps you manage user consent for personalized advertising in compliance with GDPR (General Data Protection Regulation) and CCPA (California Consumer Privacy Act).UMP integration requires the
adrop-ads-backfill module. Make sure you have completed the Getting Started installation guide first.Basic Usage
Use the Consent Manager to request user consent after initializing Adrop.Consent Status
The consent manager returns one of the following statuses:| Status | Description |
|---|---|
unknown | Consent status not yet determined |
required | Consent required (popup will be shown) |
notRequired | Consent not required (non-GDPR region) |
obtained | Consent already obtained |
Consent Result
TherequestConsentInfoUpdate callback returns an AdropConsentResult object with the following properties:
| Property | Type | Description |
|---|---|---|
status | AdropConsentStatus | Current consent status |
canRequestAds | bool | Whether ads can be requested |
canShowPersonalizedAds | bool | Whether personalized ads can be shown |
error | String? | Error message (null if no error) |
Additional Methods
You can also query the consent status and ad request availability independently:| Method | Return Type | Description |
|---|---|---|
requestConsentInfoUpdate(listener) | Future<void> | Request consent info update and show consent form if required |
getConsentStatus() | Future<AdropConsentStatus> | Get the current consent status |
canRequestAds() | Future<bool> | Check if ads can be requested |
setDebugSettings(geography) | Future<void> | Set debug geography for testing |
reset() | Future<void> | Reset consent information |
Debug Settings (Test Mode)
Test GDPR/CCPA consent flows during development:Debug Geographies
| Geography | Description |
|---|---|
disabled | Use actual device location |
eea | Test GDPR (European Economic Area) |
regulatedUSState | Test CCPA (California, etc.) |
other | Test non-regulated regions |
Complete Example
Best Practices
Request Early
Request consent as early as possible in your app lifecycle, ideally right after SDK initialization.
Handle Errors
Always handle consent errors gracefully and provide fallback behavior.
Test All Scenarios
Use debug settings to test all consent scenarios (required, not required, obtained) before release.
Respect User Choice
Once consent is obtained or declined, respect the user’s choice and don’t repeatedly ask.
Related Documentation
Targeting
Set up user and context targeting
Getting Started
SDK installation and setup guide
Reference
Types, methods, and error codes