A High-quality Flutter Advertising Plugin (GroMore, Pangolin)

Plugin Features

  • 🔨 Easy and fast access (encapsulate the native configuration, just import to start)
  • 📡 Unified return of events (returns various important callback events on the native side in a unified way to facilitate business processing and buried point statistics and other needs)
  • 🎁 Focus on optimizing the experience (flicker-free logo opening, iOS opening to prevent event penetration, permission application, privacy tracking application, etc.)
  • 🏆 Geek code encapsulation (the native code is not suitable, the basic framework is unified at both ends, the advertising event encapsulation abstraction, easy to expand new advertising forms, and it is convenient to develop personalized requirements)

Support Features

  • ✅ Open screen ads
  • ✅ Interstitial ads
  • ✅ Full screen video
  • 🔲 Incentive Video
  • 🔲 Banner
  • 🔲 Feed

Getting started

Import dependencies

dependencies:
  flutter_gromore_ads: ^1.2.0

The following 导入 SDKis the necessary configuration, don't omit it, read the documentation carefully to configure.

Initialize ad

// 导包
import 'package:flutter_gromore_ads/flutter_gromore_ads.dart';
/// [appId] 应用ID
FlutterGromoreAds.initAd(appId);

Open screen ad

  • full screen
/// [posId] 广告位 id
/// [logo] 如果传值则展示底部logo,不传不展示,则全屏展示
/// [timeout] 加载超时时间
/// [buttonType] 开屏广告的点击区域,1:全都可以点击 2:仅有下载 Bar 区域可以点击
FlutterGromoreAds.showSplashAd(
  posId,
  timeout: 3.5,
  buttonType: 2,
);
  • half screen
/// [posId] 广告位 id
/// [logo] 如果传值则展示底部logo,不传不展示,则全屏展示
FlutterGromoreAds.showSplashAd(
  posId,
  logo: 'flutterads_logo',
);

Best Practices for Logo Setup

Interstitial ads

  • half screen
/// [posId] 广告位 id
/// [width] 宽度
/// [height] 高度
FlutterGromoreAds.showInterstitialAd(
    posId,
    width: 300,
    height: 300,
);
  • full interstitial
/// [posId] 广告位 id
/// [muted] 是否静音播放视频
FlutterGromoreAds.showInterstitialFullAd(
    posId,
    muted: false,
);

Full screen video

/// [posId] 广告位 id
/// [orientation] 期望视频的播放方向,1:VERTICAL 2:HORIZONTAL
FlutterGromoreAds.showFullVideoAd(
    posId,
    orientation: 1,
);

Set up ad event listener

FlutterGromoreAds.onEventListener((event) {
    _adEvent = 'adId:${event.adId} action:${event.action}';
    if (event is AdErrorEvent) {
    // 错误事件
    _adEvent += ' errCode:${event.errCode} errMsg:${event.errMsg}';
    }
    debugPrint('onEventListener:$_adEvent');
});

Event List

eventillustrate
onAdLoadedAd loaded successfully
onAdPresentad fill
onAdExposureAd exposure
onAdClosedThe ad is closed (the screen opening time ends or the user clicks to close)
onAdClickedad click
onAdSkipad skipping
onAdCompleteAd plays or timed out
onAdErrorAdvertising error
onAdRewardGet advertising incentives

Import SDK

Android

  • import dependencies
Reference exampleofficial documentation
build.gradleClick here

Open to android/app/build.gradleadd dependencies, which one needs to be added, Adapterand which SDKshould be added in pairs

dependencies {
    //GroMore_sdk adapter
    implementation "com.gromore.cn:gdt-adapter:4.464.1334.0"  //gdt adapter
    implementation 'com.qq.e.union:union:4.464.1334'// 广点通广告 SDK
    implementation "com.gromore.cn:pangle-adapter:4.5.1.1.3" //穿山甲 adapter
    implementation 'com.pangle.cn:ads-sdk-pro:4.5.1.1'//穿山甲广告 SDK
    // 其他参考官方文档 引入即可
}

Here you can import through the remote repository, you can also follow the official example aarImport dependencies

  • Add configuration file

This plugin has built-in configurations that can be built in, only need to add a unique configuration interface, the official documentation is only for reference

Reference exampleofficial documentation
AndroidManifest.xmlClick here

Open and android/app/src/main/AndroidManifest.xmladd the corresponding configuration file, corresponding to the above SDK

<!-- GDT start================== -->
<!-- targetSDKVersion >= 24时才需要添加这个provider。provider的authorities属性的值为${applicationId}.fileprovider,请开发者根据自己的${applicationId}来设置这个值,例如本例中applicationId为"com.qq.e.union.demo"。 -->
<provider
    android:name="com.qq.e.comm.GDTFileProvider"
    android:authorities="${applicationId}.gdt.fileprovider"
    android:exported="false"
    android:grantUriPermissions="true">
    <meta-data
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/gdt_file_path" />
</provider>

<activity
    android:name="com.qq.e.ads.PortraitADActivity"
    android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
    android:screenOrientation="portrait" />
<activity
    android:name="com.qq.e.ads.LandscapeADActivity"
    android:configChanges="keyboard|keyboardHidden|orientation|screenSize"
    android:screenOrientation="landscape"
    tools:replace="android:screenOrientation" />

<!-- 声明SDK所需要的组件 -->
<service
    android:name="com.qq.e.comm.DownloadService"
    android:exported="false" />
<!-- 请开发者注意字母的大小写,ADActivity,而不是AdActivity -->

<activity
    android:name="com.qq.e.ads.ADActivity"
    android:configChanges="keyboard|keyboardHidden|orientation|screenSize" />
<!-- GDT end================== -->


<!-- Pangle start================== -->

<provider
    android:name="com.bytedance.sdk.openadsdk.TTFileProvider"
    android:authorities="${applicationId}.TTFileProvider"
    android:exported="false"
    android:grantUriPermissions="true">
    <meta-data
        android:name="android.support.FILE_PROVIDER_PATHS"
        android:resource="@xml/pangle_file_paths" />
</provider>

<provider
    android:name="com.bytedance.sdk.openadsdk.multipro.TTMultiProvider"
    android:authorities="${applicationId}.TTMultiProvider"
    android:exported="false" />

<!-- Pangle end================== -->

<!-- 其他广告配置参考官方文档添加即可================== -->	
  • Dynamically request permissions (Android only)

The necessary permissions have been added, and other permissions can be added 参考示例as 官方文档appropriate.

bool result = await FlutterGromoreAds.requestPermissionIfNecessary;

iOS

  • import dependencies
Reference exampleofficial documentation
exampleClick here

1. Copy the SDKdownloaded Ads-Mediation-CNand other Adapterrequired files to ios/Frameworks, refer to ios/Frameworks

image

2. Modify and ios/Podfileimport SDK, refer to Podfile

image

  • Add configuration file

Open and ios/Runner/Info.plistadd following configuration, refer to Info.plist

<key>NSAppTransportSecurity</key>
<dict>
    <key>NSAllowsArbitraryLoads</key>
    <true/>
</dict>
<key>NSUserTrackingUsageDescription</key>
<string>为了向您提供更优质、安全的个性化服务及内容,需要您允许使用相关权限</string>
  • Request App Tracking Transparency Authorization (iOS only) This step must be done, otherwise it will be rejected during listing review
bool result = await FlutterGromoreAds.requestIDFA;

Branch Description

branchillustrate
developdevelop branch, accept PR
masterstable branch

Changelog

View the Releases version log

encountered a problem

If you encounter problems, please submit Issues to me (it is recommended to search and try before asking questions, and do not ask questions again)

Support open source

  • Open source is not easy. It takes a lot of rest time to work overtime and stay up late to maintain it. You can appreciate and support me through the QR code below.
  • Generating electricity with love and ordering a free Star ⭐️ for this project is also a very good support.

coffee

Support List

supporteramountRemark
Song**88Gangster 666
Co**66gangster 888
At**200Great guy, it saved me a lot of time

FlutterAds ad plugin series

plugindescribe
flutter_qq_adsTencent Advertising, Guangdiantong, Youlianghui Flutter Advertising Plug-in
flutter_pangle_adsByteDance, Pangolin Flutter Advertising Plugin
flutter_gromore_adsByteDance, Pangolin, GroMore Aggregate Flutter Advertising Plugin

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add flutter_gromore_ads

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  flutter_gromore_ads: ^1.2.0

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:flutter_gromore_ads/flutter_gromore_ads.dart'; 

example/lib/main.dart

import 'package:flutter/material.dart';

import 'home_page.dart';

void main() {
  // 绑定引擎
  WidgetsFlutterBinding.ensureInitialized();
  // 启动
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      home: HomePage(),
    );
  }
} 

Download Details:

Author: FlutterAds

Source Code: https://github.com/FlutterAds/flutter_gromore_ads

#flutter #ads 

A High-quality Flutter Advertising Plugin (GroMore, Pangolin)

A High-quality Flutter Aggregation Advertising Plugin

 

一款优质的 Flutter 聚合广告插件「优量汇 & 穿山甲」

开发中,推荐先使用其他插件

FlutterAds 系列插件

plugindescribe
flutter_qq_adsTencent Advertising, Guangdiantong, Youlianghui Flutter Advertising Plug-in
flutter_pangle_adsByteDance, Pangolin Flutter Advertising Plugin
flutter_baidu_adsBaidu, Baiqingteng Flutter advertising plugin (under development)

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add flutter_union_ads

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  flutter_union_ads: ^0.0.1

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:flutter_union_ads/flutter_union_ads.dart'; 

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:flutter_union_ads/flutter_union_ads.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';

  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    String platformVersion;
    // Platform messages may fail, so we use a try/catch PlatformException.
    try {
      platformVersion = await FlutterUnionAds.platformVersion;
    } on PlatformException {
      platformVersion = 'Failed to get platform version.';
    }

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) return;

    setState(() {
      _platformVersion = platformVersion;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: $_platformVersion\n'),
        ),
      ),
    );
  }
} 

Download Details:

Author: 

Source Code: https://pub.dev/packages/flutter_union_ads

#flutter #ads 

A High-quality Flutter Aggregation Advertising Plugin

Yandex ADS for Flutter Applicaitions

flutter_yandex_ads

Yandex ADS for flutter applicaitions

Donnations

Roadmap

Android

  • [x] Banner
  • [x] Interstitial
  • [ ] Native
  • [ ] Rewarded

iOS

  • [x] Banner
  • [x] Interstitial
  • [ ] Native
  • [ ] Rewarded

Getting Started

Install package

flutter_yandex_ads:
  git:
    url: https://gitflic.ru/project/kovardin/flutter-yandex-ads.git

For android add to AndroidManifest.xml


<uses-permission android:name="com.google.android.gms.permission.AD_ID" tools:node="remove"/>

For ios add to Info.plist

<key>SKAdNetworkItems</key>
<array>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>zq492l623r.skadnetwork</string>
</dict>
</array>

And set for ios in Podfile

#use_frameworks!

Call initialization in main.dart

FlutterYandexAds ads = new FlutterYandexAds();
ads.initialize();

Created banner widget:

Container(
  height: 100,
  child: YandexAdsBannerWidget(
    ads: ads,
    id: 'R-M-DEMO-320x50',
    onAdLoaded: () {
      print('onAdLoaded');
    },
    onAdFailedToLoad: (AdLoadError err) {
      print('onAdFailedToLoad code: ${err.code}, description: ${err.description}');
    },
    onImpression: (String? data) {
      print("on ad impression ${data ?? ''}");
    },
    onAdClicked: () {
      print('onAdClicked');
    },
  ),
)

Advanced development

Generate pigeons files fo

flutter pub run pigeon \
  --input pigeons/yandex.dart \
  --dart_out lib/pigeons/yandex.dart \
  --java_out ./android/src/main/kotlin/ru/kovardin/flutter_yandex_ads/pigeons/Yandex.java \
  --java_package "ru.kovardin.flutter_yandex_ads.pigeons" \
  --objc_header_out ./ios/Classes/pigeons/Yandex.h \
  --objc_source_out ./ios/Classes/pigeons/Yandex.m


flutter pub run pigeon \
  --input pigeons/interstitial.dart \
  --dart_out lib/pigeons/interstitial.dart \
  --java_out ./android/src/main/kotlin/ru/kovardin/flutter_yandex_ads/pigeons/Interstitial.java \
  --java_package "ru.kovardin.flutter_yandex_ads.pigeons" \
  --objc_header_out ./ios/Classes/pigeons/Interstitial.h \
  --objc_source_out ./ios/Classes/pigeons/Interstitial.m


flutter pub run pigeon \
  --input pigeons/rewarded.dart \
  --dart_out lib/pigeons/rewarded.dart \
  --java_out ./android/src/main/kotlin/ru/kovardin/flutter_yandex_ads/pigeons/Rewarded.java \
  --java_package "ru.kovardin.flutter_yandex_ads.pigeons" \
  --objc_header_out ./ios/Classes/pigeons/Rewarded.h \
  --objc_source_out ./ios/Classes/pigeons/Rewarded.m

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add flutter_yandex_ads

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  flutter_yandex_ads: ^0.0.5

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:flutter_yandex_ads/compoenets/interstitial.dart';
import 'package:flutter_yandex_ads/compoenets/rewaded.dart';
import 'package:flutter_yandex_ads/pigeons/interstitial.dart';
import 'package:flutter_yandex_ads/pigeons/rewarded.dart';
import 'package:flutter_yandex_ads/pigeons/yandex.dart';
import 'package:flutter_yandex_ads/widgets/banner.dart';
import 'package:flutter_yandex_ads/widgets/native.dart';
import 'package:flutter_yandex_ads/yandex.dart'; 

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_yandex_ads/compoenets/interstitial.dart';
import 'dart:async';

import 'package:flutter_yandex_ads/widgets/banner.dart';
import 'package:flutter_yandex_ads/yandex.dart';

void main() {
  runApp(const App());
}

class App extends StatefulWidget {
  const App({Key? key}) : super(key: key);

  @override
  State<App> createState() => _AppState();
}

class _AppState extends State<App> {
  FlutterYandexAds ads = FlutterYandexAds();

  @override
  void initState() {
    super.initState();

    ads.initialize();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: DefaultTabController(
        length: 4,
        child: SafeArea(
          child: Scaffold(
            appBar: AppBar(
              title: const Text('Yandex ADS'),
            ),
            bottomNavigationBar: const TabBar(
              tabs: [
                Tab(child: Text('Banner', style: TextStyle(color: Colors.black54, fontSize: 12))),
                Tab(child: Text('Interstitial', style: TextStyle(color: Colors.black54, fontSize: 12))),
                Tab(child: Text('Native', style: TextStyle(color: Colors.black54, fontSize: 12))),
                Tab(child: Text('Rewarded', style: TextStyle(color: Colors.black54, fontSize: 12))),
              ],
            ),
            body: TabBarView(
              children: [
                BannerScreen(ads: ads),
                InterstitialScreen(ads: ads),
                Icon(Icons.directions_bike),
                Icon(Icons.directions_bike),
              ],
            ),
          ),
        ),
      ),
    );
  }
}

class BannerScreen extends StatefulWidget {
  BannerScreen({Key? key, required this.ads}) : super(key: key);

  FlutterYandexAds ads;

  @override
  _BannerScreenState createState() => _BannerScreenState();
}

class _BannerScreenState extends State<BannerScreen> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        Text('Banner'),
        Container(
          height: 100,
          child: YandexAdsBannerWidget(
            ads: widget.ads,
            id: 'R-M-DEMO-320x50',
            onAdLoaded: () {
              print('banner onAdLoaded');
            },
            onAdFailedToLoad: (AdLoadError err) {
              print('banner onAdFailedToLoad code: ${err.code}, description: ${err.description}');
            },
            onImpression: (String? data) {
              print("banner onImpression ${data ?? ''}");
            },
            onAdClicked: () {
              print('banner onAdClicked');
            },
          ),
        ),
      ],
    );
  }
}

class InterstitialScreen extends StatefulWidget {
  InterstitialScreen({Key? key, required this.ads}) : super(key: key);

  FlutterYandexAds ads;

  @override
  _InterstitialScreenState createState() => _InterstitialScreenState();
}

class _InterstitialScreenState extends State<InterstitialScreen> {
  late YandexAdsIntersttialComponents interstitial;

  @override
  void initState() {
    super.initState();

    interstitial = YandexAdsIntersttialComponents(
      id: 'R-M-DEMO-320x480',
      ads: widget.ads,
      onAdLoaded: () {
        print('interstitial onAdLoaded');
      },
      onAdFailedToLoad: (AdLoadError err) {
        print('interstitial onAdFailedToLoad code: ${err.code}, description: ${err.description}');
      },
      onAdDismissed: () {
        print("interstitial onAdDismissed");
      },
      onAdShown: () {
        print("interstitial onAdShown");
      },
      onImpression: (String? data) {
        print('interstitial onImpression ${data}');
      },
    );

    interstitial.load();
  }

  @override
  Widget build(BuildContext context) {
    return Column(
      mainAxisAlignment: MainAxisAlignment.center,
      children: [
        const Text('Interstitial'),
        ElevatedButton(
          onPressed: () {
            interstitial.show();
          },
          child: Text('show'),
        ),
      ],
    );
  }
} 

Download Details:

Author: kovardin

Source Code: https://gitflic.ru/project/kovardin/flutter-yandex-ads

#ads #flutter 

Yandex ADS for Flutter Applicaitions

Freestar Ads Mediation plugin for Flutter apps

freestar_flutter_plugin

Freestar Flutter plugin is a Flutter plugin package for publishers and app developers who wish to display ads in their Flutter app.

Supports Android and iOS platforms.

Getting Started

See our integration instructions to display Freestar mediated ads in your Flutter app today.

Other Platforms

Freestar Ads Mediation on other platforms:

https://github.com/freestarcapital/SDK_documentation_Android/wiki https://github.com/freestarcapital/SDK_documentation_ios/wiki

Flutter Notes

A Flutter plug-in package is a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter in general, see online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add freestar_flutter_plugin

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  freestar_flutter_plugin: ^1.1.7

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:freestar_flutter_plugin/freestar_flutter_plugin.dart'; 

example/lib/main.dart

import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'dart:ui';
import 'dart:async';
import 'dart:developer' as developer;
import 'package:freestar_flutter_plugin/freestar_flutter_plugin.dart';


void main() {
  WidgetsFlutterBinding.ensureInitialized();
  SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
      .then((_) {
    runApp(new MyApp());
  });
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp>
    implements InterstitialAdListener, RewardedAdListener, BannerAdListener, NativeAdListener {

  InterstitialAd _interstitialAd = new InterstitialAd();
  RewardedAd _rewardedAd = new RewardedAd();
  BannerAd _bannerAd = BannerAd.from(null, BannerAd.AD_SIZE_BANNER_320x50, null, false);
  BannerAd _mrecBannerAd = BannerAd.from(null, BannerAd.AD_SIZE_MREC_300x250, null, false);
  NativeAd _smallNativeAd = NativeAd.fromParams(null, NativeAd.NATIVE_TEMPLATE_SMALL, null, false);
  NativeAd _mediumNativeAd = NativeAd.fromParams(null, NativeAd.NATIVE_TEMPLATE_MEDIUM, null, false);

  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    developer.log('fsfp_tag: before plugin init', name: 'main.dart');
    try {
      FreestarFlutterPlugin.enableLogging(true);
      FreestarFlutterPlugin.enableTestMode(true);
      FreestarFlutterPlugin.enablePartnerChooser(true);
    } on PlatformException {}

    if (defaultTargetPlatform == TargetPlatform.android) {
      FreestarFlutterPlugin.init("XqjhRR"); //android key
    } else if (defaultTargetPlatform == TargetPlatform.iOS) {
      FreestarFlutterPlugin.init("XqjhRR");  //ios key can be different
    }

  }

  void _loadBannerAd() {
    print("fsfp_tag: BannerAdButton.dart. loadAd.");
    _bannerAd.bannerAdListener = this;
    //_bannerAd.placement = "optional-placement";
    _bannerAd.loadAd();
  }

  void _loadMRECBannerAd() {
    _mrecBannerAd.bannerAdListener = this;
    //_mrecBannerAd.placement = "optional-placement";
    _mrecBannerAd.loadAd();
  }

  void _loadSmallNativeAd() {
    _smallNativeAd.nativeAdListener = this;
    //_smallNativeAd.placement = "optional-placement";
    _smallNativeAd.loadAd();
  }

  void _loadMediumNativeAd() {
    _mediumNativeAd.nativeAdListener = this;
    //_mediumNativeAd.placement = "optional-placement";
    _mediumNativeAd.loadAd();
  }

  void _loadInterstitialAd() {
    _interstitialAd.interstitialAdListener = this;
    //_interstitialAd.placement = "optional-placement";
    _interstitialAd.loadAd();
  }

  void _loadRewardedAd() {
    _rewardedAd.rewardedAdListener = this;
    //_rewardedAd.placement = "optional-placement";
    Map targetingParams = Map();
    targetingParams["my-targeting-param1"] = "example value 1";
    targetingParams["my-targeting-param2"] = "example value 2";
    _rewardedAd.targetingParams = targetingParams; //optional
    _rewardedAd.loadAd();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        //backgroundColor: Color.fromARGB(255, 250, 30, 0),
        body: Center(
          child: SingleChildScrollView(
            child: Container(
              margin: const EdgeInsets.only(top: 40.0),
              child: Column(
                mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                children: <Widget>[
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                    children: <Widget>[
                      TextButton(
                        onPressed: _loadBannerAd,
                        child: Text('BANNER'),
                      ),
                      TextButton(
                        onPressed: _loadMRECBannerAd,
                        child: Text('MREC'),
                      ),
                      TextButton(
                        onPressed: _loadSmallNativeAd,
                        child: Text('SM-NATIVE'),
                      ),
                      TextButton(
                        onPressed: _loadMediumNativeAd,
                        child: Text('MED-NATIVE'),
                      ),
                    ],
                  ),
                  Row(
                    mainAxisAlignment: MainAxisAlignment.spaceEvenly,
                    children: <Widget>[
                      TextButton(
                        onPressed: _loadInterstitialAd,
                        child: Text('INTERSTITIAL'),
                      ),
                      TextButton(
                        onPressed: _loadRewardedAd,
                        child: Text('REWARED'),
                      ),
                    ],
                  ),
                  Text('Banner Ad Below'),
                  Container(
                      margin: const EdgeInsets.only(top: 16.0),
                      width: 320.0,
                      height: 50.0,
                      child: _bannerAd),
                  Text('MREC Banner Ad Below'),
                  Container(
                      margin: const EdgeInsets.only(top: 16.0),
                      width: 300.0,
                      height: 250.0,
                      child: _mrecBannerAd),
                  Text('Small Native Ad Below'),
                  Container(
                      margin: const EdgeInsets.only(top: 16.0),
                      width: window.physicalSize.width,
                      height: 100.0,
                      child: _smallNativeAd),
                  Text('Medium Native Ad Below'),
                  Container(
                      margin: const EdgeInsets.only(top: 16.0),
                      width: window.physicalSize.width,
                      height: 350.0,
                      child: _mediumNativeAd),

                ],
              ),
            ),
          ),
        ),
      ),
    );
  }

  String _notNull(String? str) {
    if (str == null)
      return "";
    else
      return str;
  }

  @override
  void onInterstitialAdShown(String? placement) {
    print("fsfp_tag: main.dart. onInterstitialAdShown. placement: [" +
        _notNull(placement) +"]");
  }

  @override
  void onInterstitialAdDismissed(String? placement) {
    print("fsfp_tag: main.dart. onInterstitialAdDismissed. placement: [" +
        _notNull(placement) +"]");
  }

  @override
  void onInterstitialAdClicked(String? placement) {
    print("fsfp_tag: main.dart. onInterstitialAdClicked. placement: [" +
        _notNull(placement) +"]");
  }

  @override
  void onInterstitialAdFailed (String? placement, String errorMessage) {
    print("fsfp_tag: main.dart. onInterstitialAdFailed . placement: [" +
        _notNull(placement) +"] error: " + errorMessage);
  }

  @override
  void onInterstitialAdLoaded(String? placement) {
    print("fsfp_tag: main.dart. onInterstitialAdLoaded. placement: [" +
        _notNull(placement) +"]");
    _interstitialAd.showAd();
  }

  @override
  void onRewardedAdCompleted(String? placement) {
    print("fsfp_tag: main.dart. onRewardedAdCompleted. placement: [" +
        _notNull(placement) +"]");
  }

  @override
  void onRewardedAdDismissed(String? placement) {
    print("fsfp_tag: main.dart. onRewardedAdDismissed. placement: [" +
        _notNull(placement) + "]");
  }

  @override
  void onRewardedAdShownError(String? placement, String errorMessage) {
    print("fsfp_tag: main.dart. onRewardedAdShownError. placement: [" +
        _notNull(placement) +"]");
  }

  @override
  void onRewardedAdShown(String? placement) {
    print("fsfp_tag: main.dart. onRewardedAdShown. placement: [" +
        _notNull(placement) +"]");
  }

  @override
  void onRewardedAdFailed(String? placement, String errorMessage) {
    print("fsfp_tag: main.dart. onRewardedAdFailed. placement: [" +
        _notNull(placement) +"]  error: " + errorMessage);
  }

  @override
  void onRewardedAdLoaded(String? placement) {
    print("fsfp_tag: main.dart. onRewardedAdLoaded. placement: [" +
        _notNull(placement) + "]");
    _rewardedAd.showAd("secret-12345", "myUserId765", "V-Bucks", "9000");
  }

  @override
  void onBannerAdClicked(String? placement) {
    print("fsfp_tag: main.dart. onBannerAdClicked. placement: [" +
        _notNull(placement) + "]");
  }

  @override
  void onBannerAdFailed(String? placement, String errorMessage) {
    print("fsfp_tag: main.dart. onBannerAdFailed. placement: [" +
        _notNull(placement) + "]  error: " + errorMessage);
  }

  @override
  void onBannerAdLoaded(String? placement) {
    print("fsfp_tag: main.dart. onBannerAdLoaded. placement: [" +
        _notNull(placement) +"]");
  }

  @override
  void onNativeAdClicked(String? placement) {
    print("fsfp_tag: main.dart. onNativeAdClicked. placement: [" +
        _notNull(placement) + "]");
  }

  @override
  void onNativeAdFailed(String? placement, String errorMessage) {
    print("fsfp_tag: main.dart. onNativeAdFailed. placement: [" +
        _notNull(placement) + "]  error: " + errorMessage);
  }

  @override
  void onNativeAdLoaded(String? placement) {
    print("fsfp_tag: main.dart. onNativeAdLoaded. placement: [" +
        _notNull(placement) + "]");
  }

} 

Download Details:

Author: freestarcapital

Source Code: https://github.com/freestarcapital/freestar_flutter_plugin

#flutter #ads 

Freestar Ads Mediation plugin for Flutter apps

A High-quality Flutter Advertising Plugin

logo

一款优质的 Flutter 广告插件(百度、百青藤)

开发中,推荐先使用其他插件

FlutterAds 系列插件

plugindescribe
flutter_qq_adsTencent Advertising, Guangdiantong, Youlianghui Flutter Advertising Plug-in
flutter_pangle_adsByteDance, pangolin Flutter ads

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add flutter_baidu_ads

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  flutter_baidu_ads: ^0.0.1

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:flutter_baidu_ads/flutter_baidu_ads.dart'; 

example/lib/main.dart

import 'package:flutter/material.dart';
import 'dart:async';

import 'package:flutter/services.dart';
import 'package:flutter_baidu_ads/flutter_baidu_ads.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  String _platformVersion = 'Unknown';

  @override
  void initState() {
    super.initState();
    initPlatformState();
  }

  // Platform messages are asynchronous, so we initialize in an async method.
  Future<void> initPlatformState() async {
    String platformVersion;
    // Platform messages may fail, so we use a try/catch PlatformException.
    try {
      platformVersion = await FlutterBaiduAds.platformVersion;
    } on PlatformException {
      platformVersion = 'Failed to get platform version.';
    }

    // If the widget was removed from the tree while the asynchronous platform
    // message was in flight, we want to discard the reply rather than calling
    // setState to update our non-existent appearance.
    if (!mounted) return;

    setState(() {
      _platformVersion = platformVersion;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: $_platformVersion\n'),
        ),
      ),
    );
  }
} 

Download Details:

Author: 

Source Code: https://pub.dev/packages/flutter_baidu_ads

#flutter #ads 

A High-quality Flutter Advertising Plugin
Code  Geek

Code Geek

1658809260

Facebook Ads | How To Create Facebook Ads For Beginners (Step By Step)

Learn how to use Facebook ads step by step in this Facebook ads tutorial. In this video, i cover how to use fakebook ads, how to create a Facebook page, how to design the ad and than we jump into the targeting of the Facebook ad.

TimeStamps

00:00 Intro
03:20 Creating A Facebook Page
10:50 Designing An Ad
21:05 Meta Business Suite
28:00 Creating A Facebook Ad
38:30 Create Ad With Ad Manager
1:07:09 Additional Resources

Subscribe: https://www.youtube.com/c/Darrelwilsonbug/featured 

#ads #adsfacebook 

Facebook Ads | How To Create Facebook Ads For Beginners (Step By Step)
Code  Geek

Code Geek

1658721202

Facebook Ads Tutorial for Beginners 2022 - Complete Tutorial

In this video, learn Facebook Ads For Beginners - Complete Tutorial

Facebook ads are one of the best ways to promote your business, sell a product or service, get leads, or anything that can benefit from advertising.

00:00:00 INTRODUCTION
00:15:56 Account Creation
00:47:21 PAYMENT SETUP
00:55:53 Marketing Objective
01:32:49 Facebook Ads Policies
01:40:59 Complete Structure of Account
01:59:49 Campaign,Adset & Ad-Formats Level
02:09:19 AD SET STRUCTURE & BEST PRACTICES
02:35:29 Landing Pages
02:54:18 Hidden Tricks of  Facebook
03:06:10: Lead Generation Strategies

Subscribe: https://www.youtube.com/c/wscubetechjodhpur/featured 

#ads #adsfacebook 

Facebook Ads Tutorial for Beginners 2022 - Complete Tutorial
Ben Taylor

Ben Taylor

1658460300

What are Crypto Ad Networks | Top 7 Crypto Ad Networks

In this post, you'll learn What are Crypto Ad Networks. Top 7 Crypto Ad Networks for Marketing Blockchain products

What are Crypto Ad Networks? 

Crypto ad networks are also ad networks, just like Google AdSense and other networks. The only difference is that this ad network type supports crypto-related projects. The networks approve only those businesses and websites that are blockchain-oriented.

If you have one, try crypto advertising industries. You can run highly efficient ad campaigns by using native ads and banner ads through this type of network.

If you want to attract your desired traffic in masses towards your crypto projects, you should monetize such content with crypto ad networks and use advertising strategies accordingly. In this way, you can achieve maximum benefits.

And how are they important?

There is a list of useful and best Crypto Ad networks that will help publishers and advertisers promote their business. Some of the Networks are also the Best Ad Networks for Small Publishers.

No Matter, even if you have very small targeted crypto Traffic, you can monetize your website with these Ad Networks and earn bitcoin from your blog or website.

Most of the Networks are based on the Cost per click model. You can find more Best CPC Ad Networks that you can use to monetize your website. 

These networks are the best source for growing traffic towards the website as it delivers targeted traffic to your website and saves you time. In this way, by interacting with the real people who are really interested in viewing and purchasing your product.

In this write-up, we will review the top 7 cryptocurrency ad network.

1. Coinzilla: Best Crypto Ad Network

  • Website: https://cointraffic.io/
  • Traffic & Engagement/Month: 4.1M+ traffic
  • Popular: Indonesia, Brazil, Ukraine, Turkey, India

Established in 2014, Coinzilla is a bitcoin advertising network that provides merchants with a viable option for displaying and promoting cryptocurrency-related services. Managed by Sevio Solutions, Coinzilla works with over 200 companies and 400 publishers to deliver high-quality advertisements for bitcoin-related websites.

With a strong reputation in both the bitcoin and blockchain industries, Coinzilla is committed to helping merchants increase revenue and reach their goals. As a result, advertisers can rest assured that their message will be seen by a wide audience of interested individuals. Whether you’re looking to promote a new website or raise awareness of an existing service, Coinzilla can help you achieve your objectives.

  • Payment Method: Credit card, BTC, ETH, and Web money
  • Pros: Referral program, Reliable and quick payments, Quality advertisers
  • Cons: Strict website requirements

2. A-ADS

  • Website: https://a-ads.com/
  • Traffic & Engagement/Month: 2.0M+ traffic
  • Popular: Russia, Slovakia, India, Bangladesh, Vietnam

A-ADS is known as one of the first crypto advertising networks in the market. It was mainly started in 2011 and can maintain an awesome business reputation. In the present time, these ads, which are known as, are extremely famous. A customer might be able to look in some open and clear statistics that they can gain around 80 million impressions daily if we view their core and central proficiency, which can take as crypto traffic and advertising of crypto-type projects.

If a client can be involved in the sense of crypto-gambling, exchange, and ICO of any sort, then a customer can probably select A-ADS.  We can also take this network most reliable and convenient for advertisers. Here in this platform, campaign creation is quite easy and simple, as well as the overall approval process is fast and furious. There are many options to adjust campaigns for the sake of desired performance. A client might be able to use geotargeting.

Pros:

  • Great anonymity.
  • Non-intrusive advertising, not annoying banners, “ethical advertising”.
  • Payments are always on time.
  • Publishers can filter undesired ads.
  • Advertisers can filter undesired sites.
  • A-ADS doesn’t put cookies on publishers’ websites.
  • High CPM for Bitcoin traffic.

Cons: You may have to wait a while for your website to be reviewed


3. Bitmedia.io

  • Website: https://bitmedia.io/
  • Traffic & Engagement/Month: 1.5M+ traffic
  • Popular: USA, Indonesia, Brazil, Ukraine, Turkey

Bitmedia.io is an AI-based Ad networking company launched in 2015. Bitmedia attracts a whopping 1 billion impressions each month along with over 20 million unique visits. Currently, 5,000 crypto-based websites are running over 20,000 campaigns on Bitmedia. 

Bitmedia provides several targeting options to advertisers, such as geo, device, timing, and frequency. As for advertisement models, they provide both CPM and CPC. 

As for quality, Bitmedia has strict verification checks to provide only legit impressions to advertisers. First, they verify each seller manually. Next, they have check-ins like third-party traffic control, manual clicks and impression moderation, runtime verification, etc. Thanks to this, all paid traffic, bots, and fraud impressions are removed, and advertisers only pay for quality impressions. 

Regarding payments, Bitmedia offers publishers to withdraw their earnings in Bitcoin or fiat cash. The minimum withdrawal amount is 0.0001 BTC. 

Pros: Good support, Excellent user interface, Quality traffic thanks to an advanced algorithm

Cons: Only crypto-websites are allowed


4. EZmob: Best Crypto Mobile Ad Network

  • Website: https://ezmob.com/
  • Traffic & Engagement/Month: 940K+ traffic
  • Popular: USA, Germany, Japa, France, Canada

Ezmob is one of the best Mobile Advertising Network For advertisers and publishers as well. EZmob is the best crypto advertisement Network. You can purchase mobile traffic, set up operations utilizing a self-serve interface, and influence the genuine intensity of bidding in real-time. Ezmob is a full package mobile advertising company with both driving edge innovation and profound aptitude in strategy making.

Ezmob allows you to make the right decisions and value your time and efforts. They have Primum publishers and traffic from all over the world, and they can help you to get targeted traffic from over 160 countries.

EZmob has been paying publishers based on CPM, CPC, CPV, and CPI formats. They pay monthly and are always on time, that’s why thousands of publishers and advertisers trust ezmob. This is one of the best ad networks for publishers and advertisers to join

Pros: 

  • Numerous advertisement formats.
  • Bother free Setting up.
  • Quick to respond and sparkling advertisements.
  • Devoted support.
  • Responsive Ads.
  • Real-time statistics
  • Great CPM.
  • Work without disturbing your current existing Ad Networks.

Cons:

  • They don’t cover blog sites and its administrations are restricted to mobile applications.

5. Lolli

  • Website: https://www.lolli.com/
  • Traffic & Engagement/Month: 200K+ traffic
  • Popular: USA, Germany, Pakistan, Indonesia, Korea

Lolli is a company that advertises by saying they have reinvented shopping and advertising. They are one of the best crypto ad networks available.

They’re trying to change the way brands and customers interact using blockchain technology.

Lolly is a new social media platform that is looking to revolutionize the way that users interact with brands. It enables users to follow their favorite brands, informing them whenever a coupon, discount, or sale is available. Lolly coins – which is where the blockchain comes into the equation – allow users to serve as they add more personal information and interact more frequently with the platform.

In return for their loyalty, users are rewarded with coins that can be used to purchase discounts and coupons from the brands they follow. Additionally, the more active a user is on the platform, the more coins they will earn. As a result, Lolly provides an incentive for users to remain engaged with the brands they love.

Pros:

  • Available on tons of top brands
  • Easy to add to your browser
  • More stores being added constantly
  • You can earn up to 27% back in Bitcoin on your online purchases
  • Works at over 1000 stores

Cons:

  • Payouts can be a slow process
  • Withdrawal minimum

6. Cointraffic.io Leading Bitcoin Advertising Network

  • Website: https://cointraffic.io/
  • Traffic & Engagement/Month: 140K+ traffic
  • Popular: Indonesia, Brazil, Ukraine, Turkey, India

Cointraffic can play an important role in cases of both cryptos and fiat, which can suit everyone’s requirements based on the accounting front. Here the advertisers are usually able to pay€500minimumdepositwith a minimum per day budget of €20, which also expresses that in the case of any website owning a person can be sure that all the ads are rolling in as well as the advertisers are also serious about their products.

Cointraffic has almost a weak geo-restriction in place. Unfortunately, we can also take in the sense of Bitcoin advertisements that can usually show up on your website and cannot be co-related without readers. This might lead in the sense of any negative experience for the sake of readers, but in the sense in which they can offer a CPM plan, a client will still get paid. The webmaster’s payout can be taken as strictly dependent on the availability or presence of a CPM floor.

  • Pros: Platform is quick and easy to use, Support is excellent, Advertisers are on screen
  • Cons: You may have to wait a while for your website to be reviewed

7. AdBit

  • Website: https://adbit.biz/
  • Traffic & Engagement/Month: 40K+ traffic
  • Popular: Russia, Iran, Ukraine, India, Venezuela

AdBit is part of the BitRush network, and it works using a payment per day system. It is similar to Google AdSense in that advertisers are willing to share inventory on their website.

The higher the bid, the higher the participation of a particular advertiser, and the more you can earn.

The only ad format option is a caption, although it can be text, image, or interactive media, depending on the specific ad.

One of the advantages of AdBit is that payments are made to your account in real-time with each impression or click on the ad it receives. As with many crypto ad networks, there is a minimum withdrawal of 0.001 BTC.

One area where AdBit can be improved is its support, which can be slow. However, it is a reliable option that has the potential to offer a decent return.

  • Pros: Payments are made in real-time
  • Cons: Relatively small, Few ad formats, Customer support can be a bit slow

Conclusion

Cryptocurrency ad networks specialize in promoting ads related to Bitcoin and other fiat currencies on relevant websites. It’s another way to earn extra income from your website.

There are several networks to choose from, some are easier to join, and others are more economical or offer better customer support.

Thank for visiting and reading this article! Please share if you liked it!

Read more: Research Cryptocurrency Before Investing in 5 Basic Steps

#cryptocurrency #blockchain #bitcoin #ads #marketing

What are Crypto Ad Networks | Top 7 Crypto Ad Networks

AD Plugin for Flutter

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add mobad

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  mobad: ^2.3.4

Alternatively, your editor might support flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:mobad/ad.dart';
import 'package:mobad/banner_ad_view.dart';

example/lib/main.dart

import 'package:flutter/material.dart';
import 'banner.dart';
import 'interstitial.dart';
import 'reward_video.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      theme: ThemeData(
        primarySwatch: Colors.grey,
        visualDensity: VisualDensity.adaptivePlatformDensity,
        buttonTheme: ButtonThemeData(minWidth: 200),
      ),
      home: MyHomePage(),
      routes: <String, WidgetBuilder>{
        '/reward-video': (BuildContext context) => RewardVideoPage(),
        '/banner': (BuildContext context) => BannerPage(),
        '/interstitial': (BuildContext context) => InterstitialPage(),
      },
    );
  }
}

class MyHomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            RaisedButton(
                onPressed: () {
                  Navigator.of(context).pushNamed('/reward-video');
                },
                child: Text("激励视频广告")),
            RaisedButton(
                onPressed: () {
                  Navigator.of(context).pushNamed('/banner');
                },
                child: Text("Banner 广告")),
            RaisedButton(
                onPressed: () {
                  Navigator.of(context).pushNamed('/interstitial');
                },
                child: Text("插屏广告")),
          ],
        ),
      ),
    );
  }
} 

Download Details:

Author: 

Source Code: https://pub.dev/packages/mobad

#flutter #ads 

AD Plugin for Flutter

A Flutter Plugin to Show Appodeal Interstital Ads and Video Rewards

flutter_appodeal_ads

A new Flutter plugin.

Getting Started

This project is a starting point for a Flutter plug-in package, a specialized package that includes platform-specific implementation code for Android and/or iOS.

For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add flutter_appodeal_ads

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  flutter_appodeal_ads: ^0.5.1

Alternatively, your editor might support or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:flutter_appodeal_ads/flutter_appodeal_ads.dart'; 

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter_appodeal_ads/flutter_appodeal_ads.dart';

void main() {
  runApp(MyApp());
}

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    AppodealAds.init(appKey: "714a9a7202c6195c0b6ecb50fdc1d011f15abf7592e53e4b", testMode: true);
  }

  interstitialListener(AppodealAdListener event) {
    if (event == AppodealAdListener.onLoaded) {
      AppodealAds.showInterstitial();
    }
  }

  rewardedListener(AppodealAdListener event) {
    if (event == AppodealAdListener.onLoaded) {
      AppodealAds.showRewardedVideo();
    }
    if (event == AppodealAdListener.onRewarded) {
      print("Video completed and rewarded");
    }
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Column(
          children: [
            Center(
              child: ElevatedButton(
                onPressed: () {
                  AppodealAds.cacheInterstitial((AppodealAdListener event) =>
                      interstitialListener(event));
                },
                child: Text("Show Interstitial"),
              ),
            ),
            SizedBox(
              height: 20.0,
            ),
            Center(
              child: ElevatedButton(
                onPressed: () {
                  AppodealAds.cacheRewardedVideo(
                      (AppodealAdListener event) => rewardedListener(event));
                },
                child: Text("Show Rewarded video"),
              ),
            ),
          ],
        ),
      ),
    );
  }
} 

Download Details:

Author: k-achraf

Source Code: https://github.com/k-achraf/appodealads

#flutter #android #ads 

A Flutter Plugin to Show Appodeal Interstital Ads and Video Rewards

To Easily Add Ads into Your App with Flutter

To easily add ads into your app.

Features

  • Google Mobile Ads (banner, interstitial, rewarded ad)
  • Unity Ads (banner, interstitial, rewarded ad)
  • AppLovin Ads (interstitial, rewarded ad)

Prerequisites

  • Flutter 1.22.0 or higher
  • Android
    • Android Studio 3.2 or higher
    • Target Android API level 19 or higher
    • Set compileSdkVersion to 28 or higher
    • Android Gradle Plugin 4.1 or higher (this is the version supported by Flutter out of the box)
  • Ios
  • Recommended: Create an AdMob account and register an Android and/or iOS app (To show live ads on a published app, it is required to register that app).

Platform Specific Setup

iOS

Update your Info.plist

Update your app's ios/Runner/Info.plist file to add two keys:

  • A GADApplicationIdentifier key with a string value of your AdMob app ID (identified in the AdMob UI).
  • A SKAdNetworkItems key with Google's SKAdNetworkIdentifier value of cstr6suwn9.skadnetwork and for applovin as well
<key>AppLovinSdkKey</key>
<string>YOUR_SDK_KEY</string>
<key>GADApplicationIdentifier</key>
<string>ca-app-pub-3940256099942544~1458002511</string>
<key>SKAdNetworkItems</key>
<array>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>cstr6suwn9.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>2U9PT9HC89.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>4468km3ulz.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>4FZDC2EVR5.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>7UG5ZH24HU.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>8s468mfl3y.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>9RD848Q2BZ.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>9T245VHMPL.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>av6w8kgt66.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>F38H382JLK.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>hs6bdukanm.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>KBD757YWX3.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>ludvb6z3bs.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>M8DBW4SV7C.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>mlmmfzh3r3.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>prcb7njmu6.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>t38b2kh725.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>TL55SBB4FM.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>WZMMZ9FP6W.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>YCLNXRL5PM.skadnetwork</string>
</dict>
<dict>
    <key>SKAdNetworkIdentifier</key>
    <string>ydx93a7ass.skadnetwork</string>
</dict>
</array>

See https://developers.google.com/admob/ios/quick-start#update_your_infoplist for more information about configuring Info.plist and setting up your App ID.

Android

Update AndroidManifest.xml

The AdMob App ID must be included in the AndroidManifest.xml. Failure to do so will result in a crash on launch of an app.

Add the AdMob App ID (identified in the AdMob UI) to the app's android/app/src/main/AndroidManifest.xml file by adding a <meta-data> tag with name com.google.android.gms.ads.APPLICATION_ID, as 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.

<manifest>
    <application>
        <meta-data android:name="applovin.sdk.key"
            android:value="YOUR_SDK_KEY"/>
        <!-- Sample AdMob App ID: ca-app-pub-3940256099942544~3347511713 -->
        <meta-data
            android:name="com.google.android.gms.ads.APPLICATION_ID"
            android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>
    </application>
</manifest>

The same value when you initialize the plugin in your Dart code.

See https://goo.gl/fQ2neu for more information about configuring AndroidManifest.xml and setting up the App ID.

Initialize Ad Ids

import 'dart:io';

import 'package:easy_ads_flutter/easy_ads_flutter.dart';
import 'package:google_mobile_ads/google_mobile_ads.dart';

class TestAdIdManager extends IAdIdManager {
  const TestAdIdManager();

  @override
  AppAdIds? get admobAdIds => AppAdIds(
    appId: Platform.isAndroid
        ? 'ca-app-pub-3940256099942544~3347511713'
        : 'ca-app-pub-3940256099942544~1458002511',
    bannerId: BannerAd.testAdUnitId,
    interstitialId: InterstitialAd.testAdUnitId,
    rewardedId: RewardedAd.testAdUnitId,
  );

  @override
  AppAdIds? get unityAdIds => AppAdIds(
    appId: Platform.isAndroid ? '4374881' : '4374880',
    bannerId: Platform.isAndroid ? 'Banner_Android' : 'Banner_iOS',
    interstitialId:
    Platform.isAndroid ? 'Interstitial_Android' : 'Interstitial_iOS',
    rewardedId: Platform.isAndroid ? 'Rewarded_Android' : 'Rewarded_iOS',
  );

  @override
  AppAdIds? get appLovinAdIds => AppAdIds(
    appId:
    'OeKTS4Zl758OIlAs3KQ6-3WE1IkdOo3nQNJtRubTzlyFU76TRWeQZAeaSMCr9GcZdxR4p2cnoZ1Gg7p7eSXCdA',
    interstitialId:
    Platform.isAndroid ? 'c48f54c6ce5ff297' : 'e33147110a6d12d2',
    rewardedId:
    Platform.isAndroid ? 'ffbed216d19efb09' : 'f4af3e10dd48ee4f',
  );

  @override
  AppAdIds? get fbAdIds => null;
}

Initialize the SDK

Before loading ads, have your app initialize the Mobile Ads SDK by calling EasyAds.instance.initialize() which initializes the SDK and returns a Future that finishes once initialization is complete (or after a 30-second timeout). This needs to be done only once, ideally right before running the app.

import 'package:easy_ads_flutter/easy_ads_flutter.dart';
import 'package:flutter/material.dart';

const IAdIdManager adIdManager = TestAdIdManager();

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await EasyAds.instance.initialize(
    adIdManager,
    testMode: true,
    adMobAdRequest: const AdRequest(),
    admobConfiguration:
    RequestConfiguration(testDeviceIds: ['adakjhdjkahdahkjdahkdhk']),
  );

  runApp(MyApp());
}

Interstital/Rewarded Ads

Load ad

EasyAds.instance.loadInterstitialAd();

Or

EasyAds.instance.loadRewardedAd();

Show ad

EasyAds.instance.showInterstitialAd();

Or

EasyAds.instance.showRewardedAd();

By default, load & show methods load/show any ads of the available AdNetwork. If you want to load/show ads from specific AdNetwork, pass the required AdNetwork in parameters.

Only 3 are currently available:

AdNetwork.admob
AdNetwork.unity
AdNetwork.appLovin

Dispose ad

EasyAds.instance.disposeAds();

By default, it disposes all the ads. But if you want to dispose ad of specific AdNetwork and AdUnitType, pass the required in the parameters.

Banner Ads

Declare ad

Declare banner ad instance variable in the widget class and initialize it. Make sure you have specified ad ids in ad id manager

final EasyAdBase? _bannerAd = EasyAds.instance.createBanner(adNetwork: AdNetwork.admob);

Initialize & Load ad

Load banner ad in the init state like this:

@override
void initState() {
  super.initState();
  
  _bannerAd?.load();
}

Show ad

This is how you may show banner ad in widget-tree somewhere:

@override
Widget build(BuildContext context) {
  Column(
    crossAxisAlignment: CrossAxisAlignment.stretch,
    children: [
      SomeWidget(),
      const Spacer(),
      _bannerAd?.show() ?? const SizedBox(),
    ],
  );
}

Dispose ad

@override
void dispose() {
  super.dispose();

  _bannerAd?.dispose();
}

Listening to the callbacks

Declare this object in the class

  StreamSubscription? _streamSubscription;

We are showing InterstitialAd here and also checking if ad has been shown. If true, we are canceling the subscribed callbacks, if any. Then, we are listening to the Stream and accessing the particular event we need

if (EasyAds.instance.showInterstitialAd()) {
  // Canceling the last callback subscribed
  _streamSubscription?.cancel();
  // Listening to the callback from showInterstitialAd()
  _streamSubscription =
  EasyAds.instance.onEvent.listen((event) {
    if (event.adUnitType == AdUnitType.interstitial &&
        event.type == AdEventType.adDismissed) {
      goToNextScreen(countryList[index]);
    }
  });
}

See Example for better understanding.

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add easy_ads_flutter

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  easy_ads_flutter: ^0.2.0

Alternatively, your editor might support or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:easy_ads_flutter/easy_ads_flutter.dart'; 

example/lib/main.dart

import 'dart:async';

import 'package:ads/models/country.dart';
import 'package:ads/models/test_ad_id_manager.dart';
import 'package:flutter/material.dart';
import 'package:easy_ads_flutter/easy_ads_flutter.dart';

const IAdIdManager adIdManager = TestAdIdManager();

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await EasyAds.instance.initialize(
    adIdManager,
    testMode: true,
    adMobAdRequest: const AdRequest(),
    admobConfiguration:
        RequestConfiguration(testDeviceIds: ['adakjhdjkahdahkjdahkdhk']),
  );

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return const MaterialApp(
      title: 'Flutter Easy Ads Example',
      home: CountryListScreen(),
    );
  }
}

class CountryListScreen extends StatefulWidget {
  const CountryListScreen({Key? key}) : super(key: key);

  @override
  _CountryListScreenState createState() => _CountryListScreenState();
}

class _CountryListScreenState extends State<CountryListScreen> {
  final EasyAdBase? _bannerAd =
      EasyAds.instance.createBanner(adNetwork: AdNetwork.admob);

  /// Using it to cancel the subscribed callbacks
  StreamSubscription? _streamSubscription;

  @override
  void initState() {
    super.initState();

    _bannerAd?.load();
  }

  @override
  void dispose() {
    super.dispose();

    EasyAds.instance.disposeAds();

    _bannerAd?.dispose();
  }

  @override
  Widget build(BuildContext context) {
    const countryList = Country.countryList;
    return Scaffold(
      appBar: AppBar(
        title: const Text("Country List"),
        centerTitle: true,
      ),
      body: Column(
        children: [
          _bannerAd?.show() ?? const SizedBox(),
          Expanded(
            child: ListView.builder(
                itemCount: countryList.length,
                itemBuilder: (context, index) {
                  return GestureDetector(
                    onTap: () {
                      if (countryList[index].countryName ==
                          'Pakistan - Rewarded') {
                        if (EasyAds.instance.showRewardedAd()) {
                          // Canceling the last callback subscribed
                          _streamSubscription?.cancel();
                          // Listening to the callback from showRewardedAd()
                          _streamSubscription =
                              EasyAds.instance.onEvent.listen((event) {
                            if (event.adUnitType == AdUnitType.rewarded &&
                                event.type == AdEventType.adDismissed) {
                              goToNextScreen(countryList[index]);
                            }
                          });
                        }
                      } else {
                        if (EasyAds.instance.showInterstitialAd()) {
                          // Canceling the last callback subscribed
                          _streamSubscription?.cancel();
                          // Listening to the callback from showInterstitialAd()
                          _streamSubscription =
                              EasyAds.instance.onEvent.listen((event) {
                            if (event.adUnitType == AdUnitType.interstitial &&
                                event.type == AdEventType.adDismissed) {
                              goToNextScreen(countryList[index]);
                            }
                          });
                        }
                      }
                    },
                    child: Card(
                      child: Padding(
                        padding: const EdgeInsets.all(8.0),
                        child: Text(
                          Country.countryList[index].countryName,
                          style: const TextStyle(
                              fontSize: 28, fontWeight: FontWeight.w300),
                        ),
                      ),
                    ),
                  );
                }),
          ),
        ],
      ),
    );
  }

  void goToNextScreen(Country country) {
    Navigator.push(
      context,
      MaterialPageRoute(
        builder: (context) => CountryDetailScreen(country: country),
      ),
    );
  }
}

class CountryDetailScreen extends StatefulWidget {
  final Country country;

  const CountryDetailScreen({Key? key, required this.country})
      : super(key: key);

  @override
  State<CountryDetailScreen> createState() => _CountryDetailScreenState();
}

class _CountryDetailScreenState extends State<CountryDetailScreen> {
  final EasyAdBase? _bannerAd =
      EasyAds.instance.createBanner(adNetwork: AdNetwork.unity);

  @override
  void initState() {
    super.initState();

    EasyAds.instance.loadInterstitialAd();

    _bannerAd?.load();
  }

  @override
  void dispose() {
    super.dispose();

    _bannerAd?.dispose();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text(widget.country.countryName),
        centerTitle: true,
      ),
      body: Column(
        crossAxisAlignment: CrossAxisAlignment.stretch,
        children: [
          Container(
            height: 200,
            decoration: BoxDecoration(
              image: DecorationImage(
                image: NetworkImage(widget.country.imageUrl),
              ),
            ),
          ),
          Padding(
            padding: const EdgeInsets.all(20.0),
            child: Center(
              child: Text(
                widget.country.countryDescription,
                style:
                    const TextStyle(fontWeight: FontWeight.w600, fontSize: 22),
              ),
            ),
          ),
          const Spacer(),
          _bannerAd?.show() ?? const SizedBox(),
        ],
      ),
    );
  }
} 

Download Details:

Author: nooralibutt

Source Code: https://github.com/nooralibutt/easy-ads

#flutter  #ads 

To Easily Add Ads into Your App with Flutter

Huawei Ads Kit Flutter Plugin

Huawei Ads Kit Flutter Plugin This plugin enables communication between Huawei Ads SDK and Flutter platform. Huawei Ads Kit Plugin for Flutter provides the following 2 services:

  • Publisher Service: HUAWEI Ads Publisher Service utilizes Huawei's vast user base and extensive data capabilities to deliver targeted, high quality ad content to users. With this service, your app will be able to generate revenues while bringing your users content which is relevant to them.
  • Identifier Service: HUAWEI Ads Kit provides the open advertising identifier (OAID) for advertisers to deliver personalized ads and attribute conversions.

Learn More

Installation

Please see pub.dev and AppGallery Connect Configuration.

Documentation

Questions or Issues

If you have questions about how to use HMS samples, try the following options:

  • Stack Overflow is the best place for any programming questions. Be sure to tag your question with huawei-mobile-services.
  • Github is the official repository for these plugins, You can open an issue or submit your ideas.
  • Huawei Developer Forum HMS Core Module is great for general questions, or seeking recommendations and opinions.
  • Huawei Developer Docs is place to official documentation for all HMS Core Kits, you can find detailed documentations in there.

If you run into a bug in our samples, please submit an issue to the GitHub repository.

License

Huawei Ads Kit Flutter Plugin is licensed under Apache 2.0 license

Use this package as a library

Depend on it

Run this command:

With Flutter:

 $ flutter pub add huawei_ads

This will add a line like this to your package's pubspec.yaml (and run an implicit flutter pub get):

dependencies:
  huawei_ads: ^13.4.45+308

Alternatively, your editor might support or flutter pub get. Check the docs for your editor to learn more.

Import it

Now in your Dart code, you can use:

import 'package:huawei_ads/adslite/ad_param.dart';
import 'package:huawei_ads/adslite/ad_size.dart';
import 'package:huawei_ads/adslite/banner/banner_ad.dart';
import 'package:huawei_ads/adslite/banner/banner_ad_size.dart';
import 'package:huawei_ads/adslite/banner/banner_view.dart';
import 'package:huawei_ads/adslite/consent/ad_provider.dart';
import 'package:huawei_ads/adslite/consent/consent.dart';
import 'package:huawei_ads/adslite/hw_ads.dart';
import 'package:huawei_ads/adslite/instream/instream_ad.dart';
import 'package:huawei_ads/adslite/instream/instream_ad_loader.dart';
import 'package:huawei_ads/adslite/instream/instream_ad_view.dart';
import 'package:huawei_ads/adslite/instream/instream_ad_view_elements.dart';
import 'package:huawei_ads/adslite/interstitial/interstitial_ad.dart';
import 'package:huawei_ads/adslite/nativead/detailed_creative_type.dart';
import 'package:huawei_ads/adslite/nativead/dislike_ad_reason.dart';
import 'package:huawei_ads/adslite/nativead/native_ad.dart';
import 'package:huawei_ads/adslite/nativead/native_ad_configuration.dart';
import 'package:huawei_ads/adslite/nativead/native_ad_controller.dart';
import 'package:huawei_ads/adslite/nativead/native_styles.dart';
import 'package:huawei_ads/adslite/request_options.dart';
import 'package:huawei_ads/adslite/reward/reward_ad.dart';
import 'package:huawei_ads/adslite/reward/reward_verify_config.dart';
import 'package:huawei_ads/adslite/splash/splash_ad.dart';
import 'package:huawei_ads/adslite/video_configuration.dart';
import 'package:huawei_ads/adslite/video_operator.dart';
import 'package:huawei_ads/hms_ads.dart';
import 'package:huawei_ads/hms_ads_lib.dart';
import 'package:huawei_ads/identifier/advertising_id_client.dart';
import 'package:huawei_ads/installreferrer/install_referrer_client.dart';
import 'package:huawei_ads/installreferrer/referrer_details.dart';
import 'package:huawei_ads/utils/bundle.dart';
import 'package:huawei_ads/utils/channels.dart';
import 'package:huawei_ads/utils/constants.dart';
import 'package:huawei_ads/utils/view_types.dart'; 

example/lib/main.dart

/*
    Copyright 2020-2021. Huawei Technologies Co., Ltd. All rights reserved.

    Licensed under the Apache License, Version 2.0 (the "License")
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        https://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
*/
import 'package:flutter/material.dart';
import 'package:huawei_ads/hms_ads_lib.dart';
import 'package:huawei_ads_example/pages/publisher/banner_ad_platform_view_page.dart';

import 'pages/ads_menu_page.dart';
import 'pages/publisher/publisher_service_page.dart';
import 'pages/publisher/consent_page.dart';
import 'pages/publisher/banner_ad_page.dart';
import 'pages/publisher/interstitial_ad_page.dart';
import 'pages/publisher/native_ad_page.dart';
import 'pages/publisher/reward_ad_page.dart';
import 'pages/publisher/splash_ad_page.dart';
import 'pages/publisher/instream_ad_page.dart';
import 'pages/identifier/oaid_page.dart';
import 'pages/installreferrer/install_referrer_page.dart';
import 'utils/constants.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  try {
    await HwAds.init();
  } catch (e) {
    print('EXCEPTION | $e');
  }
  runApp(HmsAdsDemo());
}

class HmsAdsDemo extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      routes: {
        '/': (context) => AdsMenuPage(),
        // publisher
        Routes.publisherService: (context) => PublisherPage(),
        Routes.consent: (context) => ConsentPage(),
        Routes.bannerAd: (context) => BannerAdPage(),
        Routes.bannerAdPlatformView: (context) => BannerAdPlatformViewPage(),
        Routes.interstitialAd: (context) => InterstitialAdPage(),
        Routes.rewardAd: (context) => RewardAdPage(),
        Routes.nativeAd: (context) => NativeAdPage(),
        Routes.splashAd: (context) => SplashAdPage(),
        Routes.instreamAd: (context) => InstreamAdPage(),
        // identifier
        Routes.identifierOaid: (context) => OaidPage(),
        // install referrer
        Routes.installReferrerService: (context) => InstallReferrerPage(),
      },
    );
  }
} 

Download Details:

Author: HMS-Core

Source Code: https://github.com/HMS-Core/hms-flutter-plugin/tree/master/flutter-hms-ads

#flutter #huawei #ads 

Huawei Ads Kit Flutter Plugin
Rowena  Cox

Rowena Cox

1625908020

Get Filthy Rich by Monetizing Your Xamarin.Forms App with AdMob

Monetizing your app can be a nice way to get something back for the effort and love that you’ve put into your Xamarin.Forms app. One way of doing it is by adding ads to your app. In this video I will show you how you can include Google AdMob ads in your Xamarin.Forms application without too much hassle.

We will learn about a plugin that you can use for this, how to show banners, interstitial ads and even reward video advertisements!

🔗 Links
Sample code Repo: https://github.com/jfversluis/XFAdMobSample
Plugin Repo: https://github.com/marcojak/MTAdmob
Plugin Blogpost:https://www.xamarinexpert.it/admob-made-easy/

Xamarin Forms Repo: https://github.com/xamarin/Xamarin.Forms

⏱ Timestamps
0:00 Intro
0:30 AdMob Plugin Blogpost & GitHub Repository
2:00 Outline Sample App
2:35 Install ATAdMob NuGet
3:40 Important Note About the IDs for Testing
4:20 Make iOS and Android Apps Metadata Ready for Showing Ads
6:48 Add Initialization Code
9:30 Implement Banner Ad
11:25 Run Sample App (Banner Ad)
11:57 Important Notes About Privacy!
13:10 Implement Video Reward and Interstitial Ads
18:04 Run Sample App (Video and Interstitial)
19:15 Where to Find the IDs in Google AdMob
20:58 Outro

#xamarin #android #ios #ads #admob

Get Filthy Rich by Monetizing Your Xamarin.Forms App with AdMob

Pablo Orellana

1620105240

How To Create Youtube Ads | Youtube Ads Tutorial

Learn How To Create Youtube Ads | Youtube Ads Tutorial

Subscribe: https://www.youtube.com/c/ZinoTrustTutorials/featured

#ads #web-development

How To Create Youtube Ads | Youtube Ads Tutorial

Pablo Orellana

1620090840

How To Create Facebook And Instagram Ads | Facebook Ads Tutorial

Learn How To Create Facebook And Instagram Ads | Facebook Ads Tutorial

Subscribe: https://www.youtube.com/c/ZinoTrustTutorials/featured

#ads #web-development

How To Create Facebook And Instagram Ads | Facebook Ads Tutorial