Skip to main content

adquanta_ads_sdk 1.7.2 copy "adquanta_ads_sdk: ^1.7.2" to clipboard
adquanta_ads_sdk: ^1.7.2 copied to clipboard

AdQuanta Ads SDK for Flutter - 专业的移动广告聚合SDK

AdQuanta Ads SDK for Flutter #

AdQuanta Ads SDK 是一个功能强大的移动广告聚合SDK,支持多种广告形式,帮助开发者轻松集成广告功能,实现收益最大化。

功能特性 #

  • ✅ 多种广告形式:Android 与 iOS 支持 Banner、Splash、Rewarded、Interstitial 和 Native;GAME 为 Android-only
  • ✅ 统一API接口:提供简洁统一的API,降低集成复杂度
  • ✅ 双端原生桥接:Android 与 iOS 使用同一套 Dart API 和广告生命周期事件
  • ✅ 完善的回调:提供完整的广告生命周期回调,便于业务处理
  • ✅ 隐私合规:支持GDPR、CCPA等隐私合规配置

系统要求 #

  • Flutter 3.3.0 或更高版本
  • Android API Level 24 (Android 7.0) 或更高版本
  • iOS 13.0 或更高版本

Android 与 iOS 支持五种核心广告。GAME 仅支持 Android;Web 和桌面会安全降级,不注册或请求广告。

安装 #

在您的 pubspec.yaml 文件中添加依赖:

dependencies:
  adquanta_ads_sdk: ^1.7.0

然后运行:

flutter pub get

快速开始 #

1. 初始化 SDK #

在应用启动时初始化 SDK(建议在 main() 函数中):

import 'package:adquanta_ads_sdk/adquanta_ads_sdk.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  
  if (AdquantaSdk.isSupported) {
    await AdquantaSdk.init(
      appId: 'YOUR_APP_ID',
      userId: 'OPTIONAL_HOST_USER_ID',
      gameEnabled: false,
    );
  }
  
  runApp(MyApp());
}

在 Web 和桌面平台,AdquantaSdk.isSupported 为 false。基础 API 返回安全默认值;广告对象和 Widget 不会触发 MissingPluginException,加载回调会收到一次错误码 -2。 当前 Plugin 只保证单 FlutterEngine 下的进程级初始化;同一进程使用多个 FlutterEngine 时,应由宿主只在主 Engine 初始化一次。

iOS 宿主配置 #

iOS 宿主的 Podfile 必须包含 AdQuanta 私有 Specs 与 CocoaPods CDN:

source 'https://github.com/Ad-Quanta/AdQuantaSpecs.git'
source 'https://cdn.cocoapods.org/'

platform :ios, '13.0'

target 'Runner' do
  use_frameworks! :linkage => :static
end

在 Info.plist 配置宿主自己的 GADApplicationIdentifier。插件管理 Google UMP 同意流程,但不会请求 ATT; 只有宿主实际请求 ATT 时才添加 NSUserTrackingUsageDescription。 iOS 桥接不会把 userId、peripheralMac、peripheralVersion 或其他身份字段转发到原生 custom values。

AdQuantaAdsSDK/Core 0.0.4 已发布到上述 Specs。正常接入不需要设置 ADQUANTA_IOS_SDK_PATH, 插件 Podspec 会传递依赖原生 SDK。宿主还需保留下文的完整渠道 SDK 依赖。

unset ADQUANTA_IOS_SDK_PATH
flutter pub get
cd ios
pod update AdQuantaAdsSDK --repo-update

宿主 App 双 Path 本地联调(可选)

宿主先在 pubspec.yaml 中通过 Path 引用本地 Flutter 插件:

dependencies:
  adquanta_ads_sdk:
    path: /path/to/adquanta-sdk-flutter

Flutter 的 Path 依赖只会定位本插件,不会自动改变 CocoaPods 对 AdQuantaAdsSDK/Core 0.0.4 的解析。 仅在同时修改原生 SDK 时,宿主才需要在自己的 ios/Podfile 中用 :path 覆盖 iOS SDK;:path 不能写在插件 Podspec 的 s.dependency 中:

local_adquanta_ios_sdk = ENV.fetch('ADQUANTA_IOS_SDK_PATH')

target 'Runner' do
  use_frameworks! :linkage => :static

  pod 'AdQuantaAdsSDK/Core', :path => File.expand_path(local_adquanta_ios_sdk)

  # 保留宿主原有的 flutter_install_all_ios_pods 调用。
  flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
end

因此实际解析链为:宿主 App pubspec.yaml path → 本地 Flutter 插件 → 宿主 Podfile :path → 本地 AdQuanta iOS SDK。若只配置第一层 Path,CocoaPods 会从 Specs 安装正式的 0.0.4。

AdQuantaAdsSDK/Core 固定携带 TradPlus 和全部受支持的静态 Adapter。宿主 target 还必须显式声明完整的广告源 SDK, 否则最终链接会出现未定义符号:

pod 'VungleAds'
pod 'InMobiSDK'
pod 'MintegralAdSDK/All'
pod 'Ads-Global'
pod 'YandexMobileAds', '8.2.1'
pod 'zMaticoo'
pod 'TaurusxAdsSDK'
pod 'MolocoSDKiOS'
pod 'MagniteSDK'

渠道后台配置、Info.plist、SKAdNetwork、Privacy Manifest 审核和 App Store 隐私披露均由宿主负责。插件的 UMP 流程会将当前 canRequestAds 交给 AdQuanta;即使它暂时为 false,底层 SDK 仍会完成初始化,后续 routed load 由底层拒绝或放行。

本地 SDK Podspec 版本必须满足插件声明的 0.0.4,然后执行:

flutter pub get
export ADQUANTA_IOS_SDK_PATH=/path/to/mediation-sdk/ios
cd ios
pod install
cd ..
flutter run
flutter build ios

只有选择本地原生 SDK 联调时,上述命令才需要继承该环境变量;正式接入应取消它。

2. 使用 Banner 广告 #

import 'package:adquanta_ads_sdk/adquanta_ads_sdk.dart';

class MyBannerWidget extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return AdquantaBanner(
      adUnitId: 'YOUR_BANNER_AD_UNIT_ID',
      autoLoad: true,
      padding: const EdgeInsets.only(bottom: 12),
      listener: MyBannerListener(),
    );
  }
}

class MyBannerListener extends AdquantaBannerListener {
  @override
  void onAdLoaded(AdquantaAdInfo adInfo) {
    print('Banner 广告加载成功: ${adInfo.adSourceName}');
  }

  @override
  void onAdLoadFailed(AdquantaAdError error) {
    print('Banner 广告加载失败: ${error.message}');
  }

  @override
  void onAdClicked(AdquantaAdInfo adInfo) {
    print('Banner 广告被点击');
  }

  @override
  void onAdImpression(AdquantaAdInfo adInfo) {
    print('Banner 广告展示成功');
  }

  @override
  void onAdClosed(AdquantaAdInfo adInfo) {
    print('Banner 广告关闭');
  }
}

AdquantaBanner starts collapsed, reveals itself after a successful load, and collapses itself after a load or show failure. The optional padding is part of the collapsible area, so host applications do not need to manage Banner size or visibility. On iOS it does not load by default: pass an AdquantaBannerController and call loadAd(), or opt into the compatibility behavior with autoLoad: true. Android keeps its existing auto-load default. Listeners only observe lifecycle events. loadAd() 完成只表示请求已发送到原生层;最终结果以 Listener 的 loaded/failed 回调为准。

3. 使用 Splash 开屏广告 #

import 'package:adquanta_ads_sdk/adquanta_ads_sdk.dart';

class SplashScreen extends StatefulWidget {
  @override
  _SplashScreenState createState() => _SplashScreenState();
}

class _SplashScreenState extends State<SplashScreen> {
  late AdquantaSplash _splashAd;

  @override
  void initState() {
    super.initState();
    _splashAd = AdquantaSplash(
      adUnitId: 'YOUR_SPLASH_AD_UNIT_ID',
      listener: MySplashListener(),
    );
    _splashAd.loadAd();
  }

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: Container(
        child: Center(child: CircularProgressIndicator()),
      ),
    );
  }
}

class MySplashListener extends AdquantaSplashListener {
  @override
  void onAdLoaded(AdquantaAdInfo adInfo) {
    // 广告加载成功,显示开屏广告
    // 注意:实际的显示逻辑需要在 Flutter 端处理
    print('Splash 广告加载成功');
  }

  @override
  void onAdLoadFailed(AdquantaAdError error) {
    // 广告加载失败,跳转到主界面
    print('Splash 广告加载失败: ${error.message}');
  }

  @override
  void onAdClosed(AdquantaAdInfo adInfo) {
    // 广告关闭,跳转到主界面
    print('Splash 广告关闭');
  }

  @override
  void onAdClicked(AdquantaAdInfo adInfo) {
    print('Splash 广告被点击');
  }

  @override
  void onAdImpression(AdquantaAdInfo adInfo) {
    print('Splash 广告展示成功');
  }
}

4. 使用 Rewarded 激励视频广告 #

import 'package:adquanta_ads_sdk/adquanta_ads_sdk.dart';

class RewardedAdExample extends StatefulWidget {
  @override
  _RewardedAdExampleState createState() => _RewardedAdExampleState();
}

class _RewardedAdExampleState extends State<RewardedAdExample> {
  late AdquantaRewarded _rewardedAd;

  @override
  void initState() {
    super.initState();
    _rewardedAd = AdquantaRewarded(
      adUnitId: 'YOUR_REWARDED_AD_UNIT_ID',
      listener: MyRewardedListener(),
    );
    _rewardedAd.loadAd();
  }

  Future<void> _showRewardedAd() async {
    final isReady = await _rewardedAd.isReady();
    if (isReady) {
      await _rewardedAd.showAd();
    } else {
      print('Rewarded 广告还未准备好');
    }
  }

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: Text('激励视频广告')),
      body: Center(
        child: ElevatedButton(
          onPressed: _showRewardedAd,
          child: Text('观看视频获得奖励'),
        ),
      ),
    );
  }
}

class MyRewardedListener extends AdquantaRewardedListener {
  @override
  void onAdLoaded(AdquantaAdInfo adInfo) {
    print('Rewarded 广告加载成功');
  }

  @override
  void onAdLoadFailed(AdquantaAdError error) {
    print('Rewarded 广告加载失败: ${error.message}');
  }

  @override
  void onAdReward(AdquantaAdInfo adInfo) {
    print('获得奖励: ${adInfo.currencyName} ${adInfo.amount}');
    // 在这里处理奖励逻辑
  }

  @override
  void onAdClosed(AdquantaAdInfo adInfo) {
    print('Rewarded 广告关闭');
    // 可以重新加载广告
  }

  @override
  void onAdClicked(AdquantaAdInfo adInfo) {
    print('Rewarded 广告被点击');
  }

  @override
  void onAdImpression(AdquantaAdInfo adInfo) {
    print('Rewarded 广告展示成功');
  }

}

5. 使用 Native 原生广告 #

AdquantaNative 在 Android 使用 AndroidView,在 iOS 使用 UiKitView。iOS 默认不自动加载或展示,宿主通过 controller 显式调用 loadAd() / showAd();Android 保留原有自动加载、自动展示默认值。加载或展示失败时 Widget 自动折叠。

class NativeAdExample extends StatefulWidget {
  const NativeAdExample({super.key});

  @override
  State<NativeAdExample> createState() => _NativeAdExampleState();
}

class _NativeAdExampleState extends State<NativeAdExample> {
  final _controller = AdquantaNativeController();

  @override
  Widget build(BuildContext context) {
    return Column(
      children: [
        AdquantaNative(
          key: const ValueKey('feed_native'),
          adUnitId: 'feed_native',
          height: 320,
          controller: _controller,
          listener: MyNativeListener(),
        ),
        ElevatedButton(
          onPressed: () async {
            if (await _controller.isReady()) {
              await _controller.showAd();
            } else {
              await _controller.loadAd();
            }
          },
          child: const Text('加载或展示 Native'),
        ),
      ],
    );
  }
}

class MyNativeListener extends AdquantaAdListener {
  @override
  void onAdLoaded(AdquantaAdInfo adInfo) {
    print('Native 加载并渲染成功: ${adInfo.provider}');
  }

  @override
  void onAdLoadFailed(AdquantaAdError error) {
    print('Native 加载失败: ${error.message}');
  }

  @override
  void onAdShowFailed(AdquantaAdError error, AdquantaAdInfo adInfo) {
    print('Native 渲染失败: ${error.message}');
  }

  @override
  void onAdClicked(AdquantaAdInfo adInfo) {
    print('Native 被点击');
  }

  @override
  void onAdImpression(AdquantaAdInfo adInfo) {
    print('Native 产生展示');
  }
}

Native 的 Provider 选择、素材渲染、点击和曝光由原生 AdQuanta SDK 负责,Flutter 插件不维护 AdMob/TradPlus 专用布局。adUnitId 是 PlatformView 创建期参数;动态切换广告位时请同步更换 Key。

6. 使用插屏广告 #

final interstitial = AdquantaInterstitial(
  adUnitId: 'interstitial_slot',
  listener: MyInterstitialListener(),
);

await interstitial.loadAd();
if (await interstitial.isReady()) {
  await interstitial.showAd();
}

// 在所属页面销毁时调用
await interstitial.dispose();

插屏回调使用通用 AdquantaAdListener,包括加载、展示失败、点击、展示和关闭事件。

7. 使用 GAME(Android) #

AdquantaGame(
  key: const ValueKey('game_center_tab'),
  adUnitId: 'game_slot',
  height: 96,
  androidDrawableName: 'game_center_entry',
  listener: MyGameListener(),
)

AdquantaGame 在 EventChannel ready 后自动加载,使用通用 AdquantaAdListener。普通 GAME 不传 androidDrawableName;Game Center 入口传宿主 drawable 名称,用户点击底层真实 View 后进入游戏中心。

class MyGameListener extends AdquantaAdListener {
  @override
  void onAdLoaded(AdquantaAdInfo adInfo) {
    print('GAME 加载成功');
  }

  @override
  void onAdLoadFailed(AdquantaAdError error) {
    print('GAME 加载失败: ${error.message}');
  }
}

启用 GAME 时,首次初始化必须传 gameEnabled: true:

await AdquantaSdk.init(
  appId: 'YOUR_APP_ID',
  gameEnabled: true,
);

GAME 是 Android-only 能力。MiniGame AAR 及其运行时依赖由宿主 Flutter App 的 android/app 工程按 Android SDK 集成文档显式提供;本插件不会打包 Android SDK 声明为 compileOnly 的依赖。

将宿主设计的入口图片放入 android/app/src/main/res/drawable/game_center_entry.xml(也可使用 PNG/WebP)。开启 shrinkResources 时,在 android/app/src/main/res/raw/keep.xml 中保留动态解析的资源:

<?xml version="1.0" encoding="utf-8"?>
<resources
    xmlns:tools="http://schemas.android.com/tools"
    tools:keep="@drawable/game_center_entry" />

MiniGame AAR 不随 Flutter 插件分发。开启 Game Center 的宿主需从 MiniGame 官方渠道获取 unite-sdk-1.1.0.aar,放入 android/app/libs/minigame/,并在 App 模块声明:

implementation files("libs/minigame/unite-sdk-1.1.0.aar")
implementation "androidx.core:core-ktx:1.17.0"
implementation "androidx.appcompat:appcompat:1.7.1"
implementation "com.google.android.material:material:1.13.0"
implementation "androidx.browser:browser:1.8.0"
implementation "io.coil-kt:coil:2.6.0"
implementation "io.coil-kt:coil-svg:2.6.0"
implementation "androidx.media3:media3-exoplayer:1.4.1"
implementation "androidx.media3:media3-ui:1.4.1"

adUnitId 和 androidDrawableName 都是 PlatformView 创建期参数;动态切换时必须使用包含这些参数的 新 Key。drawable 名非空但资源不存在时,PlatformView 创建会返回参数错误;未传 drawable 时插件不判断 底层路由,失败由 Android SDK 的 onAdLoadFailed 上报。

API 参考 #

AdquantaSdk #

SDK 主类,用于初始化和配置。

方法

  • init({required String appId, String? userId, bool gameEnabled = false, ...}) - 初始化 SDK
  • setDebugLoggingEnabled(bool enabled) - 控制 Flutter 插件桥接日志;iOS SDK 自身日志级别不可由宿主设置
  • showPrivacyOptionsForm() - 展示可用的 UMP 隐私选项
  • isPrivacyOptionsSupported() - 查询当前是否需要隐私选项入口
  • getVersion() - 查询当前原生 SDK 版本

AdquantaBanner #

Banner 广告类,是一个 Widget。

属性

  • adUnitId - 广告单元 ID
  • listener - 广告监听器
  • controller - 可选 AdquantaBannerController,用于显式加载
  • autoLoad - iOS 默认 false,Android 默认 true
  • width - Banner 宽度(可选)
  • height - Banner 高度(可选,默认 50)

Banner 尺寸由原生 SDK 回传。Android 使用 AdquantaAdInfo.widthDp/heightDp;iOS 在 loaded 信息没有尺寸时通过内部 onAdSizeChanged 桥接事件补齐,宿主 Listener 不会收到该内部事件。

AdquantaSplash #

Splash 开屏广告类。

方法

  • loadAd({double? bottomViewHeight}) - 加载广告;参数仅为兼容保留,Flutter 不会把它伪造成原生 Splash bottomView
  • showAd() - 显示广告
  • dispose() - 销毁广告实例

AdquantaRewarded #

Rewarded 激励视频广告类。

方法

  • loadAd() - 加载广告
  • showAd() - 显示广告
  • isReady() - 检查广告是否已准备好
  • dispose() - 销毁广告实例

AdquantaNative #

Android Native 广告 PlatformView。

属性

  • adUnitId - AdQuanta Native Slot ID
  • height - PlatformView 高度
  • listener - 通用 AdquantaAdListener
  • controller - 可选 AdquantaNativeController
  • autoLoad - Widget 创建后是否自动加载,iOS 默认 false,Android 默认 true
  • autoShow - 加载成功后是否自动展示,iOS 默认 false,Android 默认 true
  • padding - 可选外边距

方法

  • AdquantaNativeController.loadAd() - 发起加载
  • AdquantaNativeController.isReady() - 查询底层 Native 是否可展示
  • AdquantaNativeController.showAd() - 展示到插件持有的 Native 容器

AdquantaGame #

Android GAME PlatformView,EventChannel ready 后自动加载。

属性

  • adUnitId - AdQuanta Game Slot ID
  • androidDrawableName - 可选宿主 Android drawable 资源名;Game Center Slot 使用
  • height - PlatformView 高度
  • listener - 通用 AdquantaAdListener
  • padding - 可选外边距

从旧 Android 桥接迁移 #

旧 API/行为 1.7.0 + Android SDK 0.0.15
AdquantaSdk.init(appId: ...) 可增加 userId;使用 GAME 时增加 gameEnabled: true
Interstitial/Rewarded showAd(sceneId: ...) showAd();底层 0.0.15 不再接收 sceneId
AdquantaNativeListener 通用 AdquantaAdListener
Native 的 sceneId、AdMob/TradPlus layout name 删除;渲染完全由底层 AdquantaNative 负责
Native 仅自动渲染 controller 新增 isReady()/showAd(),并可设置 autoShow: false
AdquantaGameCenter、AdquantaGameListener、controller 主动打开 统一为 AdquantaGame + AdquantaAdListener,由用户点击真实 View 打开
gameCenterTitle / androidGameCenterDrawableName 删除 title;drawable 改为 androidDrawableName
Banner onAdRequest/onAdSizeChanged 删除公开回调;Widget 内部消费原生 SDK 回传的尺寸

Native 的 adUnitId,以及 GAME 的 adUnitId/androidDrawableName,都是 PlatformView 创建期身份参数。 运行时切换这些值时,必须同时使用新的 Key 来触发旧 View dispose 和新 View 创建。 Android Activity 因配置变化重建时,进行中的全屏或 Native 广告不会自动恢复;宿主应在新页面状态稳定后重新调用 loadAd()。Plugin 不会为被系统中断的请求伪造 reward、close 等广告事件。

SDK 辅助 API #

Google Analytics 控制仅在 Android 调用原生实现;其他平台会安全返回默认值:

await AdquantaSdk.setGoogleAnalyticsEnabled(true);
final analyticsEnabled = await AdquantaSdk.isGoogleAnalyticsEnabled();

Android 与 iOS 都支持查询当前原生 SDK 版本和 UMP 隐私选项能力:

final sdkVersion = await AdquantaSdk.getVersion();
final privacyOptionsSupported = await AdquantaSdk.isPrivacyOptionsSupported();

隐私合规配置 #

初始化时通过以下参数传入隐私默认值;需要用户随时调整 UMP 选项时,调用 AdquantaSdk.showPrivacyOptionsForm():

await AdquantaSdk.init(
  appId: 'YOUR_APP_ID',
  underAgeOfConsent: false,
  ageRestrictedUser: false,
  lgpdAllowDataUpload: true,
);

final canRequestAds = await AdquantaSdk.showPrivacyOptionsForm();

该调用在表单成功结束时返回当前 canRequestAds 并更新 iOS 后续广告加载状态。若表单无法展示,它返回 false,但不会覆盖此前已应用到 iOS SDK 的加载状态。

常见问题 #

1. 广告无法加载 #

  • 检查 App ID 和 Ad Unit ID 是否正确
  • 确保网络连接正常
  • 确认在应用启动时调用了 AdquantaSdk.init()

2. Banner 广告不显示 #

  • 确保 Banner Widget 已添加到 Widget 树中
  • 检查广告尺寸设置是否正确
  • 确保容器有足够的空间显示广告

3. Rewarded 广告无法显示 #

  • 在显示前使用 isReady() 检查广告是否已准备好
  • 确保广告加载完成后再调用 showAd()

更新日志 #

Version 0.0.1 #

  • 初始版本发布
  • 支持 Banner、Splash、Rewarded 广告
  • 支持 iOS 和 Android 平台
  • 提供统一的 API 接口

许可证 #

本项目采用 GPL-3.0 许可证,详见 LICENSE 文件。

技术支持 #

如有问题或建议,请联系技术支持团队:support@adoptrack.com

The Android plugin can package Funlink as a TradPlus custom ad source. This preserves the existing Flutter API: Banner, Splash, Rewarded, and any future formats continue to be requested through AdquantaSdk; no Funlink method channel or MainApplication initialization is needed.

Because Android Gradle cannot bundle direct local AAR dependencies from a Flutter plugin's Android library module, add the following vendor artifacts to the consuming app at android/app/libs/funlink/:

  • funlink_2.9.0_78468644_release.aar
  • funlink_adapter_custom_tradplus_2.9.0_78468644_release.aar

Then add the following to the consuming app's android/app/build.gradle.kts dependencies block (Groovy projects use equivalent implementation files(...) statements):

implementation(files("libs/funlink/funlink_2.9.0_78468644_release.aar"))
implementation(files("libs/funlink/funlink_adapter_custom_tradplus_2.9.0_78468644_release.aar"))
implementation("com.google.android.gms:play-services-ads-identifier:18.2.0")

In the TradPlus dashboard, create a custom source with these settings:

Format Adapter class
Rewarded com.fl.saas.custom.tradplus.TPCustomRewardAdapter
Interstitial com.fl.saas.custom.tradplus.TPCustomInterstitialAdapter
Banner com.fl.saas.custom.tradplus.TPCustomBannerAdapter
Native com.fl.saas.custom.tradplus.TPCustomNativeAdapter
Splash com.fl.saas.custom.tradplus.TPCustomSpreadAdapter

Use the adapter JSON exactly as follows, substituting the Funlink console IDs:

{"appId":"FUNLINK_APP_ID","placementId":"FUNLINK_PLACEMENT_ID"}

The custom adapter initializes Funlink when TradPlus requests it. Do not call FLConfig.init from Application.onCreate: doing so can run before consent and duplicates the adapter-managed initialization.

Funlink's supplied core AAR contributes additional Android manifest entries, including READ_PHONE_STATE and QUERY_ALL_PACKAGES, besides the documented network permissions. Review their Google Play policy eligibility with Funlink before a production release.

Menta / Vlion (Android / TradPlus custom source) #

Menta is packaged as a TradPlus custom source. The Flutter API remains provider-neutral: request the AdQuanta placement as usual and configure the TradPlus custom source in the dashboard. The plugin supplies the Menta SDK and adapter, while the consuming Android app must declare the vendor Maven repository; no extra Flutter channel or Application initialization is required.

Add the HTTPS endpoint below to the consuming app's root android/build.gradle or android/build.gradle.kts repository list (the vendor guide shows the equivalent HTTP URL):

maven { url 'https://sdk.mentamob.com/repository/vlion/' }

Resolved dependencies:

implementation 'com.advlion:menta-sdk:7.00.31'
implementation 'com.advlion.adapter:tradplus-adapter:7.00.31'

In TradPlus, add a custom source for each format with these adapter classes:

Format Adapter class
Rewarded com.advlion.adapter.tradplus.VlionTPRewardVideoAdapter
Interstitial com.advlion.adapter.tradplus.VlionTPInterstitialAdapter
Banner com.advlion.adapter.tradplus.VlionTPBannerAdapter
Native com.advlion.adapter.tradplus.VlionTPNativeAdapter
Splash com.advlion.adapter.tradplus.VlionTPSplashAdapter

Use the operator-issued values in the adapter JSON. The adapter reads app_id, app_key, and slot_id (the Menta slot ID):

{"app_id":"MENTA_APP_ID","app_key":"MENTA_APP_KEY","slot_id":"MENTA_SLOT_ID"}

The adapter initializes Menta when TradPlus requests an ad. Do not initialize VlionSDk from Application.onCreate, and do not replace slot_id with a provider-specific ID in the Flutter adUnitId field.

Menta's transitive display SDK defines an application label. The consuming app must retain its own label during manifest merging:

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools">
    <application
        android:label="@string/app_name"
        tools:replace="android:label" />
</manifest>

Version 7.00.31 also emits an Android manifest-merger warning for a duplicate com.shopee.br query declaration in Menta's own AAR. It does not block the build; do not remove the vendor's package-visibility entries without confirming that Menta's deep-link behavior is not needed. Review those declarations with Menta against your Google Play policy before release.

1
likes
115
points
221
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

AdQuanta Ads SDK for Flutter - 专业的移动广告聚合SDK

Homepage

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on adquanta_ads_sdk

Packages that implement adquanta_ads_sdk