react-native-google-mobile-ads
    Preparing search index...

    Type Alias AdPoolEvent

    AdPoolEvent:
        | {
            poolId: string;
            reasons: AdPoolDegradeReason[];
            resolved: AdPoolResolvedConfig;
            type: "degraded";
        }
        | { error: AdErrorPayload; poolId: string; type: "error" }
        | {
            adId: string;
            poolId: string;
            provenance: "pool/emulated-no-sdk-preloader";
            reason: "stale-by-policy" | "refresh";
            type: "expired";
        }
        | {
            adId: string;
            poolId: string;
            provenance: "pool/emulated-no-sdk-preloader";
            replacedAdId: string
            | null;
            type: "refreshed";
        }
        | { poolId: string; type: "exhausted" }
        | { poolId: string; responseId: string; type: "available" }

    Pool lifecycle events.

    Per-ad eviction (expired) and replacement correlation (refreshed with replacedAdId) are emitted only for pools the library manages itself (provenance: 'pool/emulated-no-sdk-preloader'). SDK-managed pools expose only what is observable: buffer exhaustion (cause unknown) and per-response-id availability.

    Library-managed pools do not perpetually refill on policy eviction without consumer demand: an unprompted forever-refill produces unshown fills that depress match rate.

    Type Declaration

    • {
          poolId: string;
          reasons: AdPoolDegradeReason[];
          resolved: AdPoolResolvedConfig;
          type: "degraded";
      }
    • { error: AdErrorPayload; poolId: string; type: "error" }
    • {
          adId: string;
          poolId: string;
          provenance: "pool/emulated-no-sdk-preloader";
          reason: "stale-by-policy" | "refresh";
          type: "expired";
      }

      Library-managed pools only. Pool-owned inventory crossed the policy window (or was refreshed) and was evicted, so it can never be polled. Never describes an already-polled ad: use AdExpiry on the held ad.

    • {
          adId: string;
          poolId: string;
          provenance: "pool/emulated-no-sdk-preloader";
          replacedAdId: string | null;
          type: "refreshed";
      }

      Library-managed pools only. Pool-owned inventory was replaced. replacedAdId is the adId of the evicted ad (correlates with the preceding expired event), or null when this fill replaced nothing (a plain refill into free depth).

    • { poolId: string; type: "exhausted" }

      SDK-managed pools: the buffer became empty. Cause unknown — a normal poll draining the last ad raises the same signal as a platform eviction.

      This is the exhaustion signal (onAdsExhausted / adsExhausted on the platforms). There is no separate "stopped refilling" event: observe that by an exhausted with no later available, together with getAvailability().observedCount === 0.

    • { poolId: string; responseId: string; type: "available" }

      SDK-managed pools: a specific response id became available in the buffer. The correlation key for an observed availability time on a later poll. Refresh observability on this path is exhausted → available, not a per-ad refreshed with replacedAdId (that chain is library-managed only).