パッケージ、リポジトリ、アプリカテゴリを検索

GitHub リポジトリblaugold/user_messaging_platform

user_messaging_platform

Flutterプラグインで、ユーザーメッセージングプラットフォーム(UMP)SDKのDart APIを提供します。これは、Googleのファンドイングチョイスの一部として提供されるコンセンサス管理プラットフォーム(CMP)SDKです。

user_messaging_platform のプロジェクト画像
スター
8
フォーク
15
最終プッシュ(UTC)
2025/03/23
プロジェクト状態
アーカイブ済み

元の README

以下は英語原文のスナップショットです。最新版は GitHub をご覧ください。

[!IMPORTANT] This package has been depreacted in favor or the UMP API that is available as part of google_mobile_ads.

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
  1. Obtain your APP ID by following the Help Center instructions.

  2. 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
  1. Obtain your APP ID by following the Help Center instructions.

  2. 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:

  1. Add a NSUserTrackingUsageDescription to your Info.plist:
<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>
  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.

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.

Gabriel Terwesten GitHub avatar
GitHub 作者

Gabriel Terwesten ↗

@lotumMunich
言語DartSwiftKotlinRubyObjective-C

カテゴリー

使用している依存関係

依存関係一覧 5 件

  • flutter{"sdk":"flutter"}
  • collection^1.15.0
  • meta^1.3.0
  • flutter_test開発用{"sdk":"flutter"}
  • pedantic開発用^1.11.0

プロジェクトに合うリポジトリを選ぶには?

用途で絞り込み、開発状況を比較し、採用前に元のリポジトリで要件を確認しましょう。

  1. 名前・作者・説明で検索し、技術トピックで絞り込みます。
  2. スター、フォーク、最近のプッシュを比較します。スターは関心の目安であり、品質の保証ではありません。
  3. 利用前に GitHub で README、ライセンス、Issues を確認します。

情報源と管理

“A repository is the most basic element of GitHub.”

GitHub Docs — About repositories ↗