Pakete, Repositories und App-Kategorien suchen

GitHub-RepositoryBanhmiDev/admob_consent

admob_consent

Dies ist eine Hülle für die Google User Messaging Platform (UMP) SDK in Flutter

Projektcover von admob_consent
Sterne
13
Forks
11
Letzter Push (UTC)
22.06.2021
Projektstatus
Archiviert

Original-README

Englischer Projektschnappschuss. Aktuelle Inhalte auf GitHub.

Admob Consent Plugin

Pub Version

User Messaging Platform wrapper used for consent gathering (i.e. GDPR, ATT or both) on Android and iOS. Uses Google's new User Messaging Platform with Funding Choices.

Screenshots

Example 1 Example 2
Example 1 Example 2

Usage

To use this plugin, add admob_consent as a dependency in your pubspec.yaml file.

Requirements

1. Funding Choices
  • Create a Funding Choices account
  • Create respective messages inside Funding Choices for your desired app and publish them
2. Android Setup

Make sure to have added your app ID to AndroidManifest.xml.

<meta-data
    android:name="com.google.android.gms.ads.APPLICATION_ID"
    android:value="YOUR-APP-ID"/>
3. iOS Setup

Make sure to have added your app ID to Info.plist.

<key>GADApplicationIdentifier</key>
<string>YOUR-APP-ID</string>
3.1 iOS ATT Dialog

If you intend to use this SDK for Apple's new ATT requirement (iOS 14+), add the following to Info.plist. If you have the IDFA message enabled in Funding Choices, the ATT dialog will appear automatically after it within your app. More information here.

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

Next, you'll need to link the AppTrackingTransparency framework by going to your application's target in Xcode and clicking the plus icon on Frameworks, Libraries and Embedded Content tab. See Google's guide here.

Example
import 'package:admob_consent/admob_consent.dart';

final AdmobConsent _admobConsent = AdmobConsent();

// Form won't appear (again) if it isn't required, you can safely call this at app start
_admobConsent.show(); // Internally defaults to: forceShow: false

// Form will appear (again) even if consent was already configured (i.e. use in button to let user manage his consent)
_admobConsent.show(forceShow: true);
Listener

You can listen to the onConsentFormLoaded, onConsentFormOpened, onConsentFormObtained and onConsentFormError streams. The UMP SDK should handle most of the things though.

_admobConsent.onConsentFormObtained.listen((o) {
  // Obtained consent
});

Enjoy it?

Buy Me A Coffee

Son Nguyen GitHub avatar
GitHub-Autor

Son Nguyen ↗

SprachenJavaDartSwiftRubyObjective-C

Kategorien

Verwendete Abhängigkeiten

Abhängigkeiten 2 Einträge

  • flutter{"sdk":"flutter"}
  • flutter_testEntwicklung{"sdk":"flutter"}

Wie wähle ich ein passendes Repository?

Nach Anwendungsfall filtern, Aktivität vergleichen und vor der Nutzung das Originalprojekt prüfen.

  1. Nach Name, Autor oder Beschreibung suchen und nach Thema eingrenzen.
  2. Sterne, Forks und letzte Pushes vergleichen. Sterne zeigen Interesse, garantieren aber keine Qualität.
  3. Vor der Nutzung README, Lizenz und Issues auf GitHub prüfen.

Quellen und Pflege

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

GitHub Docs — About repositories ↗