All Projects → kmcgill88 → Admob_flutter

kmcgill88 / Admob_flutter

Licence: isc
Admob Flutter plugin that shows banner ads using native platform views.

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to Admob flutter

Qtfirebase
An effort to bring Google's Firebase C++ API to Qt + QML
Stars: ✭ 208 (-46.67%)
Mutual labels:  admob, plugin
Admob Unity Plugin
👾 An extension for Unity3d to place AdMob banners in your Android games.
Stars: ✭ 86 (-77.95%)
Mutual labels:  admob, plugin
Cordova Plugin Admob
Basic Cordova Plugin for AdMob
Stars: ✭ 263 (-32.56%)
Mutual labels:  admob, plugin
Admob Plus
Trustable AdMob Plugin for Cordova, Capacitor, Ionic
Stars: ✭ 195 (-50%)
Mutual labels:  admob, plugin
Godot Android Admob Plugin
Android AdMob plugin for Godot Game Engine 3.2 or higher
Stars: ✭ 292 (-25.13%)
Mutual labels:  admob, plugin
Chrome Vs Code
A web browser integrated in VS Code editor tabs. ☢️ experimental ☢️
Stars: ✭ 351 (-10%)
Mutual labels:  plugin
Slimefun4
Slimefun 4 - A unique Spigot/Paper plugin that looks and feels like a modpack. We've been giving you backpacks, jetpacks, reactors and much more since 2013.
Stars: ✭ 369 (-5.38%)
Mutual labels:  plugin
Findcrypt Ghidra
IDA Pro's FindCrypt ported to Ghidra, with an updated and customizable signature database
Stars: ✭ 340 (-12.82%)
Mutual labels:  plugin
Spectralizer
Audio visualizer plugin for obs-studio
Stars: ✭ 332 (-14.87%)
Mutual labels:  plugin
Chartjs Plugin Annotation
Annotation plugin for Chart.js
Stars: ✭ 389 (-0.26%)
Mutual labels:  plugin
Macsubstrate
Substrate for macOS
Stars: ✭ 381 (-2.31%)
Mutual labels:  plugin
Vue Wechat Title
为Vuejs设计的动态设置微信网页中标题的指令
Stars: ✭ 367 (-5.9%)
Mutual labels:  plugin
Apkmultichannelplugin
[Deprecated] 🚀 Android 多渠道打包的 Android Studio / IDEA 插件
Stars: ✭ 352 (-9.74%)
Mutual labels:  plugin
Miox
Modern infrastructure of complex SPA
Stars: ✭ 374 (-4.1%)
Mutual labels:  plugin
Luffy
Android字节码插件,编译期间动态修改代码,改造添加全埋点日志采集功能模块,对常见控件进行监听处理
Stars: ✭ 347 (-11.03%)
Mutual labels:  plugin
Textext
Re-editable LaTeX graphics for Inkscape
Stars: ✭ 383 (-1.79%)
Mutual labels:  plugin
Zoomove
🔍 🎆 Enlarges the image with the mouse hover and move
Stars: ✭ 339 (-13.08%)
Mutual labels:  plugin
Kak Lsp
Kakoune Language Server Protocol Client
Stars: ✭ 363 (-6.92%)
Mutual labels:  plugin
Macos headers
📚 A consistently maintained dump of most macOS Headers
Stars: ✭ 374 (-4.1%)
Mutual labels:  plugin
Android Smartwebview
A webview integrated w/ native features to help create most advanced hybrid applications.
Stars: ✭ 357 (-8.46%)
Mutual labels:  admob

admob_flutter

Build Status version version GitHub stars GitHub forks GitHub issues

Demo

A Flutter plugin that uses native platform views to show Admob banner ads!

This plugin also has support for Interstitial and Reward ads.

Installation

  • Add this to your package's pubspec.yaml file:
dependencies:
  admob_flutter: "<LATEST_VERSION>"

  • Install it - You can install packages from the command line:
flutter pub get

Android Specific Setup

Update your AndroidManifest.xml

Add your AdMob App ID to your app's AndroidManifest.xml file by adding the <meta-data> tag shown below. You can find your App ID in the AdMob UI. For android:value insert your own AdMob App ID in quotes, as shown below.

You can use these test App ID's from Admob for development:

Android: ca-app-pub-3940256099942544~3347511713
iOS: ca-app-pub-3940256099942544~1458002511
<manifest>
  <application>
    <meta-data
      android:name="com.google.android.gms.ads.APPLICATION_ID"
      android:value="ca-app-pub-3940256099942544~3347511713"/>
  </application>
</manifest>

iOS Specific Setup

Update your Info.plist per Firebase instructions.

<key>GADApplicationIdentifier</key>
<string>ca-app-pub-3940256099942544~1458002511</string>

and add

<key>io.flutter.embedded_views_preview</key>
<true/>

Starting from Beta 6, you also need to display the App Tracking Transparency authorization request for accessing the IDFA, so you have to update your Info.plist to add the NSUserTrackingUsageDescription key with a custom message describing your usage. Below is an example description text:

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

See Prepare for iOS 14+ for more information. You also need to update your ios/Podfile by adding platform :ios, '9.0' at the very top of your file.

Initialize the plugin

First thing to do before attempting to show any ads is to initialize the plugin. You can do this in the earliest starting point of your app, your main function:

import 'package:admob_flutter/admob_flutter.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  // Initialize without device test ids.
  Admob.initialize();
  // Or add a list of test ids.
  // Admob.initialize(testDeviceIds: ['YOUR DEVICE ID']);
}

If you're using iOS, you may also need to request the tracking authorization in order to display personalized ads:

// Run this before displaying any ad.
await Admob.requestTrackingAuthorization();

Supported Platforms

  • 0.3.0 >= iOS
  • 0.2.0 >= AndroidX

Supported Admob features

  • Banner Ads
  • Interstitial Ads
  • Reward Ads
  • Native Ads (Coming soon)

Check out the repository Wiki for more info!

FAQ

  • Why doesn't the Admob Banner class have a dispose method?
    • TL;DR - It's called automatically for you. Longer reason see 94
  • failed to load ad : 3
    • TL;DR - Things are working correctly, Admob didn't give you an ad. If the app id + ad unit is new, give it 24/48 hours. See:161 stackoverflow
    • See all Admob codes
  • Ads are not loading
    • TL;DR - Make sure you have the correct combination of id's per platform. See:161
  • Objective-C based project cannot build
    • TL;DR - You have to enable swift support for your flutter project. See: stackoverflow and 123
  • How do I manage consentement for users in the European Economic Area?
    • Pass nonPersonalizedAds: true to the classes constructor (AdmobBanner, AdmobInterstitial and AdmobReward) in order to not display personalized ads for users who don't give their consent. A way to ask users for their consent is to use the plugin admob_consent. Please note that the new recommended is to use the brand new UMP SDK (Android, iOS).

Recipes

Pull Requests

I welcome and encourage all pull requests. Here are some basic rules to follow to ensure timely addition of your request:

  1. Match the document style as closely as possible.
  2. Please keep PR titles easy to read and descriptive of changes, this will make them easier to review/merge.
  3. Pull requests must be made against master branch for this repository.
  4. Check for existing issues first, before filing an issue.
  5. Check the project board, before filing an issue.
  6. Read the FAQ, before filing an issue.
  7. Have fun!
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].