https://github.com/blaugold/user_messaging_platform
A flutter plugin which provides a Dart API for the User Messaging Platform (UMP) SDK, which is the Consent Management Platform (CMP) SDK provided as part of Google's Funding Choices.
https://github.com/blaugold/user_messaging_platform
cmp flutter funding-choices google plugin sdk ump user-messaging-platform
Last synced: 2 months ago
JSON representation
A flutter plugin which provides a Dart API for the User Messaging Platform (UMP) SDK, which is the Consent Management Platform (CMP) SDK provided as part of Google's Funding Choices.
- Host: GitHub
- URL: https://github.com/blaugold/user_messaging_platform
- Owner: blaugold
- License: mit
- Archived: true
- Created: 2020-12-29T16:42:08.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-03-23T14:44:57.000Z (3 months ago)
- Last Synced: 2025-04-22T19:09:27.803Z (2 months ago)
- Topics: cmp, flutter, funding-choices, google, plugin, sdk, ump, user-messaging-platform
- Language: Dart
- Homepage: https://pub.dev/packages/user_messaging_platform
- Size: 92.8 KB
- Stars: 7
- Watchers: 2
- Forks: 13
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
> [!IMPORTANT]
> This package has been depreacted in favor or the UMP API that is available as part of
> [`google_mobile_ads`](https://pub.dev/packages/google_mobile_ads).[](https://pub.dev/packages/user_messaging_platform)

A flutter plugin which provides a Dart API for the User Messaging Platform (UMP)
SDK, which is the Consent Management Platform (CMP) SDK provided as part of
Google's [Funding Choices].Also, see the
[iabtcf_consent_info](https://pub.dev/packages/iabtcf_consent_info) package, for
reading TCF consent info, made available though Consent Management Platform
SDKs, such as UMP. If you have configured Funding Choices to obtain consent for
additional purposes for you, the publisher, this package allows you to access
that information.---
If you're looking for a **database solution**, check out
[`cbl`](https://pub.dev/packages/cbl), another project of mine. It brings
Couchbase Lite to **standalone Dart** and **Flutter**, with support for:- **Full-Text Search**,
- **Expressive Queries**,
- **Data Sync**,
- **Change Notifications**and more.
---
## Setup
The UMP SDK requires some platform dependent setup.
### Android
#### App ID
1. Obtain your APP ID by following the
[Help Center instructions](https://support.google.com/admob/answer/7356431).1. Add your app ID to your AndroidManifest.xml:
```xml
```
#### More information
For more information visit the
[Android UMP SDK quick start guide](https://developers.google.com/admob/ump/android/quick-start).### iOS
#### App ID
1. Obtain your APP ID by following the
[Help Center instructions](https://support.google.com/admob/answer/7356431).1. Add your app ID to your Info.plist:
```xml
GADApplicationIdentifier
YOUR-APP-ID
```#### App Tracking Transparency
If you plan to use the App Tracking Transparency framework:
1. Add a `NSUserTrackingUsageDescription` to your Info.plist:
```xml
NSUserTrackingUsageDescription
This identifier will be used to deliver personalized ads to you.
```1. Link the `Runner` target to the `AppTrackingTransparency` under `Targets` ->
`Runner` -> `Frameworks, Libraries, and Embedded Content`.#### More information
For more information visit the
[iOS UMP SDK quick start guide](https://developers.google.com/admob/ump/ios/quick-start).## Usage
This basic usage example show how to update the consent info and show the
consent form to the user if consent is required:```dart
void updateConsent() async {
// Make sure to continue with the latest consent info.
var info = await UserMessagingPlatform.instance.requestConsentInfoUpdate();// Show the consent form if consent is required.
if (info.consentStatus == ConsentStatus.required) {
// `showConsentForm` returns the latest consent info, after the consent from has been closed.
info = await UserMessagingPlatform.instance.showConsentForm();
}
}
```### iOS: App Tracking Transparency
You can let the UMP SDK handle the
[ATT permission request](https://support.google.com/fundingchoices/answer/9995402).If you would like to determine when to show the permission request yourself, you
can check the `TrackingAuthorizationStatus` and `requestTrackingAuthorization`
through this plugin:```dart
void showATTPermissionRequest() async {
final status = await UserMessagingPlatform.instance.getTrackingAuthorizationStatus();if (status == TrackingAuthorizationStatus.notDetermined) {
await UserMessagingPlatform.instance.requestTrackingAuthorization();
}
}
```## Example
For an example to verify you configuration, take a look at the
[example tab](https://pub.dev/packages/user_messaging_platform/example).[funding choices]: https://developers.google.com/funding-choices