Giter Club home page Giter Club logo

flutter_ironsource_x's Introduction

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

flutter_ironsource_x's People

Contributors

bylbaboy avatar dnaextrim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

flutter_ironsource_x's Issues

Does not Support Anymore

Hello flutter_ironsource_x Developer,
This is the only package in pub.dev for ironsource but this package cannot be used anymore. all the flutter developers are waiting for update in this package.

So can you please update this package with latest ironsource adapters.

Thank You

add Google Play Services

Hi,
Thanks very much for the amazing plugin

is this below code must to added or optional?

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" />

is that com.google.android.gms.ads.APPLICATION_ID belongs to admob?

Error invokeMethod onImpressionSucces not implemented

java.lang.Error: Critical Error: invokeMethod onImpressionSuccess notImplemented
E/AndroidRuntime(19536): at com.ironSource.ironsource_mediation.IronSourceMediationPlugin$invokeChannelMethod$1$1.notImplemented(IronSourceMediationPlugin.kt:760)
E/AndroidRuntime(19536): at io.flutter.plugin.common.MethodChannel$IncomingResultHandler.reply(MethodChannel.java:236)
E/AndroidRuntime(19536): at io.flutter.embedding.engine.dart.DartMessenger.handlePlatformMessageResponse(DartMessenger.java:375)
E/AndroidRuntime(19536): at io.flutter.embedding.engine.FlutterJNI.handlePlatformMessageResponse(FlutterJNI.java:1003)
E/AndroidRuntime(19536): at android.os.MessageQueue.nativePollOnce(Native Method)
E/AndroidRuntime(19536): at android.os.MessageQueue.next(MessageQueue.java:326)
E/AndroidRuntime(19536): at android.os.Looper.loop(Looper.java:160)
E/AndroidRuntime(19536): at android.app.ActivityThread.main(ActivityThread.java:6669)
E/AndroidRuntime(19536): at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime(19536): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
E/AndroidRuntime(19536): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

first time rewarded ads shows successfully
on second time it crashes with above error.

class file for com.ironsource.mediationsdk.sdk.InterstitialListener not found

hello,

after using the plugin version flutter_ironsource_x: ^2.7.1 . when runing the app, i get the issue bellow:

here is my setup:

Flutter (Channel stable, 2.10.3, on macOS 12.2. darwin-x64)
โ€ข Flutter version 2.10.3
โ€ข Upstream repository https://github.com/flutter/flutter.git
โ€ข Dart version 2.16.1
โ€ข DevTools version 2.9.2

plugins used in pupspec.yaml:

  • cupertino_icons: ^1.0.2
  • url_launcher: ^6.0.20
  • http: ^0.13.4
  • webview_flutter: ^3.0.1
  • flutter_ironsource_x: ^2.7.1

`Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
/Users/korchix/AppsDevFlutter/TestApps/gameamine_new/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java:19: error: cannot access InterstitialListener
flutterEngine.getPlugins().add(new com.metamorfosis_labs.flutter_ironsource_x.FlutterIronsource_xPlugin());
^
class file for com.ironsource.mediationsdk.sdk.InterstitialListener not found
1 error

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 28s
Exception: Gradle task assembleDebug failed with exit code 1`

How destroy banner?

I get E/ironSourceSDK: API(16454): L a - can't load banner - loadBanner already called and still in progress
in hot reload

Duplicate Classes

I'm not able to build the app if I import the plugin. Here is the logs:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkDebugDuplicateClasses'.

1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class com.google.android.gms.internal.measurement.zzhx found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzmt found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzmu found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzmv found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzmw found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzmx found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzmy found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzmz found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.internal.measurement.zzna found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.internal.measurement.zznb found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.internal.measurement.zznc found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.internal.measurement.zznd found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.measurement.internal.zzga found in modules jetified-play-services-measurement-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement:20.0.2) and jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2)
Duplicate class com.google.android.gms.measurement.internal.zzhe found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.measurement.internal.zzhf found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.measurement.internal.zzhg found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.measurement.internal.zzhh found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.measurement.internal.zzhi found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.measurement.internal.zzhj found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.measurement.internal.zzio found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)
Duplicate class com.google.android.gms.measurement.internal.zzit found in modules jetified-play-services-measurement-base-20.1.2-runtime.jar (com.google.android.gms:play-services-measurement-base:20.1.2) and jetified-play-services-measurement-impl-20.0.2-runtime.jar (com.google.android.gms:play-services-measurement-impl:20.0.2)

Go to the documentation to learn how to Fix dependency resolution errors.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 1m 37s

Unity sdk non complaint warning from playstore

Your app includes SDK com.unity3d.ads:unity-ads or an SDK that one of your libraries depends on, which collects personal or sensitive data that includes but may not be limited to Advertising ID, Android ID identifiers. Persistent device identifiers may not be linked to other personal and sensitive user data or resettable device identifiers

According to the information provided by your SDK provider, you may consider upgrading to 4.0.1. Please consult the SDK provider for further information.

No Banner sizes support

Hello man,
Thanks very much for the amazing plugin, I just wondering if you can add support for other banner sizes,
also, I have a problem with banners, that they disappear when I back to previous screen.

Not working as a mediation with Meta/Facebook Audience Network

How can I use it as a mediation with Meta/Facebook Audience Network. I tried but get below error. You should make it more generic so it can be used with any ads.

E/AndroidRuntime(22462): ****************************************************************************** E/AndroidRuntime(22462): * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers * E/AndroidRuntime(22462): * should follow the instructions here: * E/AndroidRuntime(22462): * https://googlemobileadssdk.page.link/admob-android-update-manifest * E/AndroidRuntime(22462): * to add a valid App ID inside the AndroidManifest. * E/AndroidRuntime(22462): * Google Ad Manager publishers should follow instructions here: * E/AndroidRuntime(22462): * https://googlemobileadssdk.page.link/ad-manager-android-update-manifest. * E/AndroidRuntime(22462): ****************************************************************************** E/AndroidRuntime(22462): E/AndroidRuntime(22462): E/AndroidRuntime(22462): at android.app.ActivityThread.installProvider(ActivityThread.java:7194) E/AndroidRuntime(22462): at android.app.ActivityThread.installContentProviders(ActivityThread.java:6672) E/AndroidRuntime(22462): at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6567) E/AndroidRuntime(22462): at android.app.ActivityThread.access$1400(ActivityThread.java:224) E/AndroidRuntime(22462): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1887) E/AndroidRuntime(22462): at android.os.Handler.dispatchMessage(Handler.java:107) E/AndroidRuntime(22462): at android.os.Looper.loop(Looper.java:224) E/AndroidRuntime(22462): at android.app.ActivityThread.main(ActivityThread.java:7562) E/AndroidRuntime(22462): at java.lang.reflect.Method.invoke(Native Method) E/AndroidRuntime(22462): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:539) E/AndroidRuntime(22462): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:950) E/AndroidRuntime(22462): Caused by: java.lang.IllegalStateException: E/AndroidRuntime(22462): E/AndroidRuntime(22462): ****************************************************************************** E/AndroidRuntime(22462): * The Google Mobile Ads SDK was initialized incorrectly. AdMob publishers * E/AndroidRuntime(22462): * should follow the instructions here: * E/AndroidRuntime(22462): * https://googlemobileadssdk.page.link/admob-android-update-manifest * E/AndroidRuntime(22462): * to add a valid App ID inside the AndroidManifest. * E/AndroidRuntime(22462): * Google Ad Manager publishers should follow instructions here: * E/AndroidRuntime(22462): * https://googlemobileadssdk.page.link/ad-manager-android-update-manifest. * E/AndroidRuntime(22462): ******************************************************************************

init() had failed

i have the integration worked perfectly.
but ads wont load and showing the error 508.

i think the problem is the ad must init in the initialize methode
like this in the ironsource docs :

IronSource.init(this, appKey, IronSource.AD_UNIT.OFFERWALL, IronSource.AD_UNIT.INTERSTITIAL, IronSource.AD_UNIT.REWARDED_VIDEO, IronSource.AD_UNIT.BANNER);

Crash when call onDetachedFromActivity

at com.metamorfosis_labs.flutter_ironsource_x.FlutterIronsource_xPlugin.onDetachedFromActivity(FlutterIronsource_xPlugin.kt:311)
at io.flutter.embedding.engine.FlutterEngineConnectionRegistry.detachFromActivity(FlutterEngineConnectionRegistry.java:389)
at io.flutter.embedding.android.FlutterActivityAndFragmentDelegate.onDetach(FlutterActivityAndFragmentDelegate.java:560)
at io.flutter.embedding.android.FlutterActivity.release(FlutterActivity.java:595)
at io.flutter.embedding.android.FlutterActivity.onDestroy(FlutterActivity.java:616)

In FlutterIronsource_xPlugin.kt should not be write TODO, like this:

override fun onDetachedFromActivityForConfigChanges() {
//TODO("Not yet implemented")
}

override fun onReattachedToActivityForConfigChanges(binding: ActivityPluginBinding) {
//TODO("Not yet implemented")
}

override fun onDetachedFromActivity() {
//TODO("Not yet implemented")
}

Having error related to Kotlin version

Hello :) many thanks for creating this plugin~

The provided repo works fine in terms of getting the build done, but I'm having this error when trying to build on personal projects:


Running Gradle task 'assembleDebug'...
e: C:/Users/myname/.gradle/caches/transforms-2/files-2.1/683fded33b117c0eb9bb9deabca1a71e/work-runtime-2.7.0-api.jar!/META-INF/work-runtime_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':flutter_ironsource_x:compileDebugKotlin'.

Compilation error. See log for more details


I wonder if I could just copy the .kt file found inside example repo's "app/src/main/kotlin.../MainActivity.kt", but I really don't know..

Could you kindly help me out?

My build.gradle's dependencies is as follows. As I wasn't sure which ones I need (or will need in near future, like the multidex and appcompat, from the repo):


dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'androidx.appcompat:appcompat:1.2.0'
implementation 'com.google.android.gms:play-services-ads-identifier:17.0.0'
implementation 'androidx.multidex:multidex:2.0.1'
implementation 'com.ironsource.sdk:mediationsdk:7.1.14'
}


Also, do I need the AdMob-related metadata in my AndroidManifest.xml,?:


meta-data
android:name="com.google.android.gms.ads.APPLICATION_ID"
android:value="ca-app-pub-3940256099942544~3347511713"

Kind regards, thank you for any guidance

Plugin fails on example demo + own project

Hi, I'm trying to integrate your project into an app i'm working on but its getting a strange error which I can't find anything on Google about.

It seems to be some kind of logging error which is causing the ads to error even though they are ready, if i am reading this correctly?

I've updated Android Studio and Flutter, everything is on the latest versions. Here is the output i'm seeing. I would really appreciate if you could help me get to the bottom of this!

V/ironSourceSDK: EVENT( 5865): "provider":"Mediation"
V/ironSourceSDK: EVENT( 5865): "ext1":"appLanguage=Kotlin
V/ironSourceSDK: EVENT( 5865): kiag
V/ironSourceSDK: EVENT( 5865): androidx=true"
V/ironSourceSDK: EVENT( 5865): "offerwall":true
V/ironSourceSDK: EVENT( 5865): "interstitial":true
V/ironSourceSDK: EVENT( 5865): "rewardedVideo":true
V/ironSourceSDK: EVENT( 5865): "banner":true
V/ironSourceSDK: EVENT( 5865): "sessionDepth":1
...
I/chatty  ( 5865): uid=10275(com.metamorfosis_labs.flutter_ironsource_x_example) identical 3 lines
D/sdk5Events( 5865): logEvent failed eventsTracker doesn't exist
D/sdk5Events( 5865): logEvent failed eventsTracker doesn't exist
I/chatty  ( 5865): uid=10275(com.metamorfosis_labs.flutter_ironsource_x_example) identical 1 line
D/sdk5Events( 5865): logEvent failed eventsTracker doesn't exist
I/flutter ( 5865): onInterstitialAdLoadFailed : Instance of 'IronSourceError'

Could not determine artifacts for com.ironsource.sdk:mediationsdk:7.1.11:

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:checkDebugAarMetadata'.

Could not resolve all dependencies for configuration ':app:debugRuntimeClasspath'.
Could not determine artifacts for com.ironsource.sdk:mediationsdk:7.1.11: Skipped due to earlier error

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 21s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

Hello everyone , today i'm just install flutter_ironsource_x package i only copy the example code from documentation without changing any think but when i run the project , i faced this issue , i surf on network there is not one talk about it
please any help !

I dont want admob

The Google adapter is implemented in Gradle but I don't use it and it gives me an error

Can build to appbundle

โžœ  chat_frontend git:(feature/null-safe) โœ— flutter build appbundle --flavor google -t lib/main-google.dart

๐Ÿ’ช Building with sound null safety ๐Ÿ’ช


FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':twilio_programmable_video:generateReleaseRFile'.
> Could not resolve all files for configuration ':twilio_programmable_video:releaseCompileClasspath'.
   > Could not resolve com.twilio:video-android:6.4.+.
     Required by:
         project :twilio_programmable_video
      > Skipped due to earlier error
      > Failed to list versions for com.twilio:video-android.
         > Unable to load Maven meta-data from https://dl.bintray.com/ironsource-mobile/android-adapters/com/twilio/video-android/maven-metadata.xml.
            > Could not get resource 'https://dl.bintray.com/ironsource-mobile/android-adapters/com/twilio/video-android/maven-metadata.xml'.
               > Could not GET 'https://dl.bintray.com/ironsource-mobile/android-adapters/com/twilio/video-android/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeGoogleReleaseAssets'.
> Could not resolve all files for configuration ':app:googleReleaseRuntimeClasspath'.
   > Could not resolve com.twilio:video-android:6.4.+.
     Required by:
         project :app > project :twilio_programmable_video
      > Failed to list versions for com.twilio:video-android.
         > Unable to load Maven meta-data from https://dl.bintray.com/ironsource-mobile/android-sdk/com/twilio/video-android/maven-metadata.xml.
            > Could not get resource 'https://dl.bintray.com/ironsource-mobile/android-sdk/com/twilio/video-android/maven-metadata.xml'.
               > Could not GET 'https://dl.bintray.com/ironsource-mobile/android-sdk/com/twilio/video-android/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 5m 38s
Running Gradle task 'bundleGoogleRelease'...                      339.2s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':twilio_programmable_video:generateReleaseRFile'.
> Could not resolve all files for configuration ':twilio_programmable_video:releaseCompileClasspath'.
   > Could not resolve com.twilio:video-android:6.4.+.
     Required by:
         project :twilio_programmable_video
      > Skipped due to earlier error
      > Failed to list versions for com.twilio:video-android.
         > Unable to load Maven meta-data from https://dl.bintray.com/ironsource-mobile/android-adapters/com/twilio/video-android/maven-metadata.xml.
            > Could not get resource 'https://dl.bintray.com/ironsource-mobile/android-adapters/com/twilio/video-android/maven-metadata.xml'.
               > Could not GET 'https://dl.bintray.com/ironsource-mobile/android-adapters/com/twilio/video-android/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':app:mergeGoogleReleaseAssets'.
> Could not resolve all files for configuration ':app:googleReleaseRuntimeClasspath'.
   > Could not resolve com.twilio:video-android:6.4.+.
     Required by:
         project :app > project :twilio_programmable_video
      > Failed to list versions for com.twilio:video-android.
         > Unable to load Maven meta-data from https://dl.bintray.com/ironsource-mobile/android-sdk/com/twilio/video-android/maven-metadata.xml.
            > Could not get resource 'https://dl.bintray.com/ironsource-mobile/android-sdk/com/twilio/video-android/maven-metadata.xml'.
               > Could not GET 'https://dl.bintray.com/ironsource-mobile/android-sdk/com/twilio/video-android/maven-metadata.xml'. Received status code 502 from server: Bad Gateway

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
==============================================================================

* Get more help at https://help.gradle.org

BUILD FAILED in 5m 56s
Running Gradle task 'bundleGoogleRelease'...                      357.6s
[!] Gradle threw an error while downloading artifacts from the network. Retrying to download...
Gradle task bundleGoogleRelease failed with exit code 1

Listener

why not implement listener like "setInterstitialListener" and "setRewardedAdListener" and make our Life Easier!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.