Menu

Check Ad Status information

💡Tips

  • The ad status query API allows you to check whether an ad has finished loading, whether it is currently loading, and view the list of currently cached ads before showing an ad.
  • Supports querying the status of Interstitial ads, Rewarded Video ads, and App Open ads.
  • It is recommended to call the corresponding status query method before showing an ad to optimize ad display timing and user experience.

1. Overview

The HyperBid Flutter SDK provides ad status query APIs that return an McAdStatusInfo object containing the following information:

Field Type Description
isLoading bool Whether an ad is currently loading
isReady bool Whether an ad has loaded and is ready to show
adList List<McAd> List of currently cached ad information

2. Query Interstitial Ad Status

dart Copy
McAdStatusInfo statusInfo = await McSdk.checkInterstitialAdStatus("your mediation unit id");

print("Is loading: ${statusInfo.isLoading}");
print("Is the ad ready to show: ${statusInfo.isReady}");
print("Number of cached ads: ${statusInfo.adList.length}");

3. Query Rewarded Video Ad Status

dart Copy
McAdStatusInfo statusInfo = await McSdk.checkRewardedAdStatus("your mediation unit id");

print("Is loading: ${statusInfo.isLoading}");
print("Is the ad ready to show: ${statusInfo.isReady}");
print("Number of cached ads: ${statusInfo.adList.length}");

4. Query App Open Ad Status

dart Copy
McAdStatusInfo statusInfo = await McSdk.checkAppOpenAdStatus("your mediation unit id");

print("Is loading: ${statusInfo.isLoading}");
print("Is the ad ready to show: ${statusInfo.isReady}");
print("Number of cached ads: ${statusInfo.adList.length}");

5. Iterate Cached Ad List

Through the adList field, you can view detailed information for each currently cached ad:

dart Copy
// Using Rewarded Video as an example
McAdStatusInfo statusInfo = await McSdk.checkRewardedAdStatus("your mediation unit id");

for (McAd ad in statusInfo.adList) {
  print("Mediation Unit ID: ${ad.adUnitId}");
  print("Ad Network: ${ad.networkName}");
  print("Mediation Placement ID: ${ad.mediationPlacementId}");
  print("Estimated revenue: ${ad.revenue} ${ad.currency}");
  print("---");
}

📌 Ads in adList are ordered by cache sequence. Cached ad information can be used for data analysis and logging.

⚠️ Note: Status queries are asynchronous operations. Please use await to wait for the result before proceeding with subsequent logic.


Previous
Revenue Tracking
Next
Preset-Strategy
Last modified: 2026-06-25Powered by