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

    Class NativeAd

    A class for loading Native Ads.

    Index
    • Creates a new NativeAd instance.

      import { NativeAd, AdEventType, TestIds } from 'react-native-google-mobile-ads';

      const nativeAd = await NativeAd.createForAdRequest(TestIds.NATIVE, {
      requestAgent: 'CoolAds',
      });

      Parameters

      • adUnitId: string

        The Ad Unit ID for the Native Ad. You can find this on your Google Mobile Ads dashboard.

      • OptionalrequestOptions: NativeAdRequestOptions

        Optional RequestOptions used to load the ad.

      Returns Promise<NativeAd>

    • Hydrate a NativeAd from an already-loaded native payload (multi-format path). Does not issue a second network request. Package-internal.

      Parameters

      • adUnitId: string
      • props: NativeAdProps

      Returns NativeAd

    adUnitId: string
    advertiser: string | null
    body: string
    callToAction: string
    extras: Record<string, unknown> | null
    headline: string
    icon: NativeAdImage | null
    images: NativeAdImage[] | null
    mediaContent: NativeMediaContent | null
    price: string | null
    responseId: string
    responseInfo: ResponseInfo | null

    Snapshot of the loaded ad's response info, or null before load / after destroy. Additive; top-level responseId remains the registry key.

    starRating: number | null
    store: string | null