quakerbirdad 0.0.1 copy "quakerbirdad: ^0.0.1" to clipboard
quakerbirdad: ^0.0.1 copied to clipboard

outdated

Flutter信天翁广告插件

quakerbirdad Flutter信天翁广告插件 #

官方文档 #

版本更新 #

更新日志

本地开发环境 #

[✓] Flutter (Channel stable, 3.7.0, on macOS 13.1 22C65 darwin-x64, locale zh-Hans-CN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio
[✓] Android Studio (version 2022.1)
[✓] IntelliJ IDEA Ultimate Edition (version 2022.3.2)
[✓] VS Code (version 1.74.3)
[✓] Connected device (3 available)
[✓] HTTP Host Availability

集成步骤 #

1、pubspec.yaml

quakerbirdad: ^0.0.1

引入
```Dart
import 'package:quakerbirdad/quakerbirdad.dart';

2、Android

根据官方文件进行权限等配置。

3、IOS

暂不支持

使用 #

SDK初始化

QuakerBirdAd.register(
      //android  app id
      androidAppId: "881",
      //ios app id
      iosAppId: "881",
      //是否显示日志,建议正式上线时,设置为false
      debug: true,
      //是否非WiFi下提示确认
      download: QuakerBirdAdDownload.ALWAYS,
      //应用渠道id (非必填,填写后可以按渠道查看广告数据)
      channelId: "test",
      //设置是否初始化时就申请权限
      permission: true,
    );

获取SDK版本

await QuakerBirdAd.getSDKVersion();

开屏广告

QuakerBirdAdSplash(
      androidId: "3561",
      iosId: "3561",
      width: window.physicalSize.width / window.devicePixelRatio,
      height: window.physicalSize.height / window.devicePixelRatio,
      callBack: QuakerBirdAdSplashCallBack(
        onShow: () {
          print("插屏广告显示");
        },
        onError: (msg) {
          print("插屏广告失败 $msg");
        },
        onClick: () {
          print("插屏广告点击");
        },
        onDismiss: () {
          print("插屏广告关闭");
        },
        onStatus: (type, platform, status, msg) {
          print("插屏广告状态 类型:$type  平台:$platform  状态:$status  错误消息 (失败时有效):$msg");
        },
      ),
    );

插屏广告

请求广告

QuakerBirdAd.loadInteractionAd(androidId: "11087", iosId: "11087");

监听结果

FlutterUnionadStream.initAdStream(
    rewardCallBack: QuakerBirdAdRewardCallBack(
        onShow: () {
          print("激励广告显示");
        },
        onError: (msg) {
          print("激励广告失败 $msg");
        },
        onClick: () {
          print("激励广告点击");
        },
        onDismiss: () {
          print("激励广告关闭");
        },
        onStatus: (type, platform, status, msg) {
          print("激励广告状态 类型:$type  平台:$platform  状态:$status  错误消息 (失败时有效):$msg");
        },
        onReward: (type) {
          print("激励广告奖励 $type");
        },
    ),
);

横幅广告

QuakerBirdAdBanner(
              androidId: "1983",
              iosId: "1983",
              width: 500,
              height: 50,
              callBack: QuakerBirdAdBannerCallBack(
                  onShow: (){
                    print("横幅广告显示");
                  },
                  onError: (msg){
                    print("横幅广告失败 $msg");
                  },
                  onClick: (){
                    print("横幅广告点击");
                  },
                  onDismiss: (){
                    print("横幅广告关闭");
                    Navigator.pop(context);
                  },
                  onStatus: (type,platform,status,msg){
                    print("横幅广告状态 类型:$type  平台:$platform  状态:$status  错误消息 (失败时有效):$msg");
                  }
              ),
            );

模版广告

QuakerBirdAdExpress(
              androidId: "8461",
              iosId: "8461",
              width: 500,
              height: 300,
              callBack: QuakerBirdAdExpressCallBack(
                  onShow: (){
                    print("模版广告显示");
                  },
                  onError: (msg){
                    print("模版广告失败 $msg");
                  },
                  onClick: (){
                    print("模版广告点击");
                  },
                  onDismiss: (){
                    print("模版广告关闭");
                    Navigator.pop(context);
                  },
                  onStatus: (type,platform,status,msg){
                    print("模版广告状态 类型:$type  平台:$platform  状态:$status  错误消息 (失败时有效):$msg");
                  }
              ),
            ),

模版视频广告

QuakerBirdAdExpressDraw(
              androidId: "8517",
              iosId: "8517",
              width: 500,
              height: 300,
              callBack: QuakerBirdAdExpressDrawCallBack(
                  onShow: (){
                    print("模版视频广告显示");
                  },
                  onError: (msg){
                    print("模版视频广告失败 $msg");
                  },
                  onClick: (){
                    print("模版视频广告点击");
                  },
                  onDismiss: (){
                    print("模版视频广告关闭");
                    Navigator.pop(context);
                  },
                  onStatus: (type,platform,status,msg){
                    print("模版视频广告状态 类型:$type  平台:$platform  状态:$status  错误消息 (失败时有效):$msg");
                  }
              ),
            ),

全屏广告

请求广告

 QuakerBirdAd.loadFullScreenAd(androidId: "8811", iosId: "8811");

监听结果

FlutterUnionadStream.initAdStream(
    fullScreenCallBack: QuakerBirdAdFullScreenCallBack(
        onShow: () {
          print("全屏广告显示");
        },
        onError: (msg) {
          print("全屏广告失败 $msg");
        },
        onClick: () {
          print("全屏广告点击");
        },
        onDismiss: () {
          print("全屏广告关闭");
        },
        onStatus: (type, platform, status, msg) {
          print("全屏广告状态 类型:$type  平台:$platform  状态:$status  错误消息 (失败时有效):$msg");
        },
    ),
);

信息流广告

QuakerBirdAdFeed(
              androidId: "2351",
              iosId: "2351",
              width: 500,
              height: 200,
              callBack: QuakerBirdAdFeedCallBack(
                  onShow: (){
                    print("信息流广告显示");
                  },
                  onError: (msg){
                    print("信息流广告失败 $msg");
                  },
                  onClick: (){
                    print("信息流广告点击");
                  },
                  onDismiss: (){
                    print("信息流广告关闭");
                    Navigator.pop(context);
                  },
                  onStatus: (type,platform,status,msg){
                    print("信息流广告状态 类型:$type  平台:$platform  状态:$status  错误消息 (失败时有效):$msg");
                  }
              ),
            ),

激励广告

请求广告

 QuakerBirdAd.loadRewardVideoAd(androidId: "1028", iosId: "1028");

监听结果

FlutterUnionadStream.initAdStream(
    rewardCallBack: QuakerBirdAdRewardCallBack(
        onShow: () {
          print("激励广告显示");
        },
        onError: (msg) {
          print("激励广告失败 $msg");
        },
        onClick: () {
          print("激励广告点击");
        },
        onDismiss: () {
          print("激励广告关闭");
        },
        onStatus: (type, platform, status, msg) {
          print("激励广告状态 类型:$type  平台:$platform  状态:$status  错误消息 (失败时有效):$msg");
        },
        onReward: (type) {
          print("激励广告奖励 $type");
        },
    ),
);
1
likes
0
points
10
downloads

Publisher

unverified uploader

Weekly Downloads

Flutter信天翁广告插件

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on quakerbirdad

Packages that implement quakerbirdad