패키지, 저장소 및 앱 카테고리 검색

flutter_ironsource_x 표지
패키지 상세v2.7.4

flutter_ironsource_x

Flutter용 IronSource 광고 및 미디에이션 플러그인

Android
30일 다운로드
90
좋아요
35
Pub 점수
120

패키지 설치

flutter pub add flutter_ironsource_x

패키지 개요

공개 정보를 바탕으로 생성한 선택 가이드입니다.

Flutter_IronSource_X는 Android 애플리케이션에 IronSource의 광고 중개 플랫폼을 통합하는 Flutter 플러그인으로, 개발자가 광고를 효율적으로 제공하고 관리할 수 있도록 합니다. 인터스티셜, 리워드, 배너 광고와 같은 다양한 광고 형식을 지원하며, 여러 광고 네트워크를 통해 수익화를 가능하게 합니다. IronSource SDK와의 통합을 간소화하여 광고 로딩, 표시 및 이벤트 처리를 위한 직관적인 API를 제공합니다. Android 전용으로 설계되어 IronSource의 최신 기능과 성능 최적화와 호환됩니다.

사용 사례

  • 모바일 게임 수익화
  • 보상형 비디오 광고 통합
  • 인터스티셜 광고 표시
  • 다중 네트워크 광고 매개 관리
  • 실시간 입찰을 통한 앱 수익 증대

주요 기능

  • 여러 광고 형식을 지원합니다
  • 무결점의 IronSource SDK 통합
  • 실시간 광고 성과 추적
  • Android 전용 플랫폼 지원
  • 이벤트 기반 광고 라이프사이클 관리

적합한 대상

  • 안드로이드 게임 개발자
  • 광고 수익화를 목표로 하는 앱
  • IronSource 미디에이션을 사용하는 개발자
  • 보상 광고 구현이 필요한 프로젝트
  • 글로벌 대상 사용자를 위한 모바일 앱

고려 사항

  • 안드로이드 플랫폼에 제한됨
  • IronSource 계정 설정이 필요합니다
  • IronSource SDK 업데이트에 따라 다름
  • 적절한 광고 배치 전략이 필요합니다
  • 특정 광고 네트워크에 대해 추가 구성이 필요할 수 있습니다

원본 README

연결된 소스 저장소의 README 원문 스냅샷입니다. 최신 내용은 저장소에서 확인하세요.

flutter_Ironsource_x Ver. 2

Banner

Banner

Interstitial/Rewarded Video

Interstitial/Rewarded Video

Offerwall

Offerwall


In the next version, the version format will be like this

xx.xx.xxxx
 🠕  🠕  🠕
 |  |  Publish Revision
 |  IronSource SDK Major Version
 Dart Major Version

 Example:
 2.7.1
 ------------------------------
 2 is Dart Major Version
 7 is IronSource Major Version
 1 is Publish Revision

IronSource Ads for Flutter

Flutter plugin for showing IronSource ads (Android only)

If this package was helpful to you in delivering on your project or you just wanna to support this project, a cup of coffee would be highly appreciated ;-)

Please support me so I can continue to develop this Plugin. Please support me through Buy me a coffee

Buy me a coffee

Progress

  • ✅ Interstitial
  • ✅ Banner (Still experimenting)
  • ✅ Offerwall
  • ✅ Rewarded video

Using Examples

Init

  void init() async {
    var userId = await IronSource.getAdvertiserId();
    await IronSource.validateIntegration();
    await IronSource.setUserId(userId);
    await IronSource.initialize(appKey: "appKey", listener: this,
                      gdprConsent: true, ccpaConsent: false);
    rewardeVideoAvailable = await IronSource.isRewardedVideoAvailable();
    offerwallAvailable = await IronSource.isOfferwallAvailable();
    setState(() {});
  }

By default gdprConsent and ccpaConsent are true

Interstitial

    IronSource.loadInterstitial();
  void showInterstitial() async {
    if (await IronSource.isInterstitialReady()) {
      IronSource.showInterstitial();
    } else {
      print(
        "Interstial is not ready. use 'Ironsource.loadInterstial' before showing it",
      );
    }
  }
  @override
  void onInterstitialAdClicked() {
    print("onInterstitialAdClicked");
  }

  @override
  void onInterstitialAdClosed() {
    print("onInterstitialAdClosed");
  }

  @override
  void onInterstitialAdLoadFailed(IronSourceError error) {
      print("onInterstitialAdLoadFailed : ${error.toString()}");
  }

  @override
  void onInterstitialAdOpened() {
    print("onInterstitialAdOpened");
    setState(() {
      interstitialReady = false;
    });


  }

  @override
  void onInterstitialAdReady() {
    print("onInterstitialAdReady");
    setState(() {
      interstitialReady = true;
    });

  }

  @override
  void onInterstitialAdShowFailed(IronSourceError error) {

    print("onInterstitialAdShowFailed : ${error.toString()}");
    setState(() {
      interstitialReady = false;
    });
  }

  @override
  void onInterstitialAdShowSucceeded() {
    print("nInterstitialAdShowSucceeded");

Reward Video

  void showRewardedVideo() async {
    if (await IronSource.isRewardedVideoAvailable()) {
      IronSource.showRewardedVideol();
    } else {
      print("RewardedVideo not available");
    }
  }
  @override
  void onRewardedVideoAdClicked(Placement placement) {

    print("onRewardedVideoAdClicked");
  }

  @override
  void onRewardedVideoAdClosed() {
    print("onRewardedVideoAdClosed");

  }

  @override
  void onRewardedVideoAdEnded() {
    print("onRewardedVideoAdEnded");
  }

  @override
  void onRewardedVideoAdOpened() {
    print("onRewardedVideoAdOpened");

  }

  @override
  void onRewardedVideoAdRewarded(Placement placement) {

    print("onRewardedVideoAdRewarded: ${placement.placementName}");
  }

  @override
  void onRewardedVideoAdShowFailed(IronSourceError error) {

    print("onRewardedVideoAdShowFailed : ${error.toString()}");
  }

  @override
  void onRewardedVideoAdStarted() {
    print("onRewardedVideoAdStarted");
  }

  @override
  void onRewardedVideoAvailabilityChanged(bool available) {

    print("onRewardedVideoAvailabilityChanged : $available");
    setState(() {
      rewardeVideoAvailable = available;
    });
  }

Banner

IronSourceBannerAd(keepAlive: true, listener: BannerAdListener());
Banner Size Type:
  • BANNER
IronSourceBannerAd(keepAlive: true, listener: BannerAdListener(), size: BannerSize.BANNER);
  • LARGE
IronSourceBannerAd(keepAlive: true, listener: BannerAdListener(), size: BannerSize.LARGE);
  • LEADERBOARD
IronSourceBannerAd(keepAlive: true, listener: BannerAdListener(), size: BannerSize.LEADERBOARD);
  • RECTANGLE
IronSourceBannerAd(keepAlive: true, listener: BannerAdListener(), size: BannerSize.RECTANGLE);
  • SMART
IronSourceBannerAd(keepAlive: true, listener: BannerAdListener(), size: BannerSize.SMART);
  • CUSTOM
IronSourceBannerAd(
  keepAlive: true,
  listener: BannerAdListener(),
  size: BannerSize.BANNER,
  size: BannerSize(
      type: BannerSizeType.BANNER,
      width: 400,
      height: 50,
    ),
);
Banner Background Color
IronSourceBannerAd(
  keepAlive: true,
  listener: BannerAdListener(),
  size: BannerSize.BANNER,
  backgroundColor: Colors.amber, //Background Color
);
class BannerAdListener extends IronSourceBannerListener {
  @override
  void onBannerAdClicked() {
    print("onBannerAdClicked");
  }

  @override
  void onBannerAdLeftApplication() {
    print("onBannerAdLeftApplication");
  }

  @override
  void onBannerAdLoadFailed(Map<String, dynamic> error) {
    print("onBannerAdLoadFailed");

  }

  @override
  void onBannerAdLoaded() {
    print("onBannerAdLoaded");
  }

  @override
  void onBannerAdScreenDismissed() {
    print("onBannerAdScreenDismisse");
  }

  @override
  void onBannerAdScreenPresented() {
    print("onBannerAdScreenPresented");
  }
}

OfferWall


  void showOfferwall() async {
    if (await IronSource.isOfferwallAvailable()) {
      IronSource.showOfferwall();
    } else {
      print("Offerwall not available");
    }
  }
  @override
  void onGetOfferwallCreditsFailed(IronSourceError error) {

    print("onGetOfferwallCreditsFailed : ${error.toString()}");
  }

  @override
  void onOfferwallAdCredited(OfferwallCredit reward) {

    print("onOfferwallAdCredited : $reward");
  }

  @override
  void onOfferwallAvailable(bool available) {
    print("onOfferwallAvailable : $available");

    setState(() {
      offerwallAvailable = available;
    });
  }

  @override
  void onOfferwallClosed() {
    print("onOfferwallClosed");
  }

  @override
  void onOfferwallOpened() {
    print("onOfferwallOpened");
  }

  @override
  void onOfferwallShowFailed(IronSourceError error) {
    print("onOfferwallShowFailed ${error.toString()}");
  }

Update AndroidManifest.xml

Manifest Permissions

Add the following permissions to your AndroidManifest.xml file inside the manifest tag but outside the <application> tag:

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
Manifest Activities

Add the following activities inside the <application> tag in your AndroidManifest:

<activity
            android:name="com.ironsource.sdk.controller.ControllerActivity"
            android:configChanges="orientation|screenSize"
            android:hardwareAccelerated="true" />
<activity
            android:name="com.ironsource.sdk.controller.InterstitialActivity"
            android:configChanges="orientation|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.Translucent" />
<activity
            android:name="com.ironsource.sdk.controller.OpenUrlActivity"
            android:configChanges="orientation|screenSize"
            android:hardwareAccelerated="true"
            android:theme="@android:style/Theme.Translucent" />

Setting android/app/build.gradle:

dependencies {
  implementation 'com.ironsource.sdk:mediationsdk:7.2.1'
  ...
}

Change compileSdkVersion to minimum is 31

android {
    compileSdkVersion 31
    ...

Change minSdkVersion to minimum is 21 and targetSdkkVersion to minimum is 31

defaultConfig {
        ...
        minSdkVersion 21
        targetSdkVersion 31
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
    }

Setting android/build.gradle

Change ext.kotlin_version to minimum is 1.6.10

buildscript {
    ext.kotlin_version = '1.6.10'
    ...

add Google Play Services

Add xmlns:tools="http://schemas.android.com/tools" on top for replace label.

  <manifest xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    package="com.metamorfosis_labs.flutter_ironsource_x_example">

Add tools:replace="android:label" at the <application> tag

<application
        tools:replace="android:label"
        android:name="io.flutter.app.FlutterApplication"
        android:label="flutter_ironsource_x_example"
        android:networkSecurityConfig="@xml/network_security_config"
        android:usesCleartextTraffic="true"
        android:icon="@mipmap/ic_launcher">

Add the following inside the <application> tag in your AndroidManifest:

<meta-data
  android:name="com.google.android.gms.ads.APPLICATION_ID"
  android:value="ca-app-pub-xxxxxxxxxxxxxxxx~yyyyyyyyyy"/>

<meta-data android:name="com.google.android.gms.version"
  android:value="@integer/google_play_services_version" />

please read this to add google play service

Note

Make sure each widget for the Ironsource Plugin is placed on a different widget from the main or screen widget, this is to avoid collisions with the banner widget if you want the banner widget to work. For more details on how to use please see the sample source code

Mediation

follow this to add mediation sdks

Using this plugin

see directory example

Visit IronSource website to know more

Contributing

Thanks to @karnadii & @DiMiTriFrog

I will continue updating this library.

Support

If this package was helpful to you in delivering on your project or you just wanna to support this project, a cup of coffee would be highly appreciated ;-)

Buy me a coffee

카테고리

소스 저장소

이 패키지를 사용하는 프로젝트

아직 데이터가 없습니다.