pavelzaichyk / flutter_unity_ads

Unity Ads plugin for Flutter Applications. This plugin is able to display Unity Banner Ads and Unity Video Ads.
https://pub.dev/packages/unity_ads_plugin
MIT License
31 stars 12 forks source link

how to detect video ads fil availability #21

Closed sumit-coder closed 2 years ago

sumit-coder commented 2 years ago

how to detect video ads fil availability if there is no fill it just does nothing if there is a callback for that would be very helpful because this i am losing money $ plz respond

pavelzaichyk commented 2 years ago

you can try to use 'failed' callback of load method. it is a new method in 0.3.0 version of unity_ads_plugin

UnityAds.load(
  placementId: 'PLACEMENT_ID',
  onComplete: (placementId) => print('Load Complete $placementId'),
  onFailed: (placementId, error, message) {
    print('Load Failed $placementId: $error $message');
    if (error == UnityAdsLoadError.noFill) {
      //do something
    }
  },
);
sumit-coder commented 2 years ago

Thanks

you can try to use 'failed' callback of load method. it is a new method in 0.3.0 version of unity_ads_plugin

UnityAds.load(
  placementId: 'PLACEMENT_ID',
  onComplete: (placementId) => print('Load Complete $placementId'),
  onFailed: (placementId, error, message) {
    print('Load Failed $placementId: $error $message');
    if (error == UnityAdsLoadError.noFill) {
      //do something
    }
  },
);

Thanks