搜尋套件、儲存庫與 APP 分類

flutter_funding_choices 封面
套件詳情v1.1.0

flutter_funding_choices

Funding Choices 的 Flutter 實作,這是 Google 提供的一項服務,可於 AdMob 中請求使用者對個人化廣告的同意。

AndroidiOS
近 30 天下載
71
喜歡數
55
Pub 分數
150

安裝套件

flutter pub add flutter_funding_choices

套件介紹

根據套件公開資料產生的選型評估,僅供參考。

Flutter Funding Choices 是一個 Flutter 套件,整合了 Google 的 Funding Choices API,讓應用程式能在 AdMob 中請求使用者對個人化廣告的同意。此套件透過在 Android 與 iOS 平台上顯示必要的同意對話方塊,提供一種無縫方式來遵守隱私法規。該套件透過簡單的方法來檢查同意狀態並觸發同意流程,簡化實作過程。它確保符合 GDPR 及其他隱私標準,同時維持與現有廣告投放工作流程的相容性。

適用情境

  • 請求使用者同意用於個人化廣告
  • 遵守GDPR和隱私法規
  • 在Flutter應用中整合AdMob
  • 在 Android 和 iOS 上顯示同意對話方塊
  • 管理廣告個性化設定

主要特色

  • 官方 Google 資金選擇整合
  • 同時支援 Android 和 iOS
  • 用於同意檢查和對話的簡單 API
  • 自動處理同意狀態
  • 輕量且易於整合

適合對象

  • 使用 AdMob 的 Flutter 應用
  • 面向歐盟用戶的開發者
  • 需要遵守GDPR的應用程式
  • 發布者管理廣告個性化
  • 專注於隱私的行動應用程式開發者

使用建議

  • 需要 AdMob 設定
  • 在顯示個人化廣告之前必須獲得同意
  • 僅限谷歌的資助選擇服務
  • 可能需要額外的UI來管理同意
  • 不適用於非個人化廣告情境

原始 README

以下為關聯原始碼儲存庫的 README 原文快照,最新內容請造訪原始碼儲存庫。

Flutter Funding Choices

Flutter Funding Choices is an unofficial Flutter implementation of Funding Choices, a Google service that allows to request user consent for personalized ads in AdMob.

Prerequisites

You must have linked your FundingChoices account to your Admob account. See this documentation on Google Support.

Installation

Android

Your app must use Android Embedding V2. Also, you need to add an app id in your AndroidManifest.xml (in the application tag) :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
   package="fr.skyost.example">

   <application
       <!--
         Some attributes here...
        -->
    >
       <meta-data
           android:name="com.google.android.gms.ads.APPLICATION_ID"
           android:value="YOUR-APP-ID"/>
       <!--
         Activities, ...
        -->
   </application>

</manifest>

You can obtain your app ID by following these instructions.

iOS

You need to add an app id in your Info.plist :

<key>GADApplicationIdentifier</key>
<string>YOUR-APP-ID</string>

You can obtain your app ID by following these instructions. You may also need to handle Apple's App Tracking Transparency message by putting this in your Info.plist :

<key>NSUserTrackingUsageDescription</key>
<string>This identifier will be used to deliver personalized ads to you.</string>

Feel free to configure the message as you want.

How to use

There are three methods :

  • FlutterFundingChoices.requestConsentInformation() : Allows to get current user consent information (whether you need to show the consent form, whether the user wants personalized ads, ...).
  • FlutterFundingChoices.showConsentForm() : Loads and shows the consent form. You must check first that there is a consent form (with isConsentFormAvailable on the returned object of the previous method).
  • FlutterFundingChoices.reset() : Resets the consent information.

You typically want to use it like this on Android :

@override
void initState() {
  super.initState();
  WidgetsBinding.instance.addPostFrameCallback((_) async {
    ConsentInformation consentInfo = await FlutterFundingChoices.requestConsentInformation();
    if (consentInfo.isConsentFormAvailable && consentInfo.consentStatus == ConsentStatus.required) {  
      await FlutterFundingChoices.showConsentForm();
      // You can check the result by calling `FlutterFundingChoices.requestConsentInformation()` again !
    }
  });
}

Contributions

You have a lot of options to contribute to this project ! You can :

所屬分類

原始碼儲存庫

使用此套件的專案

暫無相關資料。