blaugold/user_messaging_platform
Flutter 플러그인으로, Google의 펀딩 콘셉트의 일부로 제공되는 동의 관리 플랫폼(CMP) SDK인 사용자 메시징 플랫폼(UMP) SDK를 위한 Dart API를 제공합니다.
- Stars
- 8
- Forks
- 15
- 최근 푸시(UTC)
- 2025. 3. 23.
- 프로젝트 상태
- 보관됨
기술 주제
사용 중인 의존성
의존성 목록 5 개
- flutter
{"sdk":"flutter"} - collection
^1.15.0 - meta
^1.3.0 - flutter_test개발 의존성
{"sdk":"flutter"} - pedantic개발 의존성
^1.11.0
원본 README
아래는 영문 원문 스냅샷입니다. 최신 내용은 GitHub에서 확인하세요.
README 펼치기 / 접기
[!IMPORTANT] This package has been depreacted in favor or the UMP API that is available as part of
google_mobile_ads.
https://badgen.net/pub/v/user_messaging_platform https://badgen.net/pub/license/user_messaging_platform https://badgen.net/pub/flutter-platform/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 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, 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
-
Obtain your APP ID by following the Help Center instructions.
-
Add your app ID to your AndroidManifest.xml:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.rewardedinterstitialexample">
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="YOUR-APP-ID"/>
<activity android:name=".MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>
More information
For more information visit the Android UMP SDK quick start guide.
iOS
App ID
-
Obtain your APP ID by following the Help Center instructions.
-
Add your app ID to your Info.plist:
<key>GADApplicationIdentifier</key>
<string>YOUR-APP-ID</string>
App Tracking Transparency
If you plan to use the App Tracking Transparency framework:
- Add a
NSUserTrackingUsageDescriptionto your Info.plist:
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
- Link the
Runnertarget to theAppTrackingTransparencyunderTargets->Runner->Frameworks, Libraries, and Embedded Content.
More information
For more information visit the iOS UMP SDK quick start guide.
Usage
This basic usage example show how to update the consent info and show the consent form to the user if consent is required:
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.
If you would like to determine when to show the permission request yourself, you
can check the TrackingAuthorizationStatus and requestTrackingAuthorization
through this plugin:
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.