Class POBImpression

  • All Implemented Interfaces:

    
    public class POBImpression
    
                        

    Holds the general information about an ad impression. It is required to pass the impression level information in bid request.

    • Constructor Detail

      • POBImpression

        POBImpression(String id, String adUnitId)
        Constructor
        Parameters:
        id - Impression Id
        adUnitId - Ad unit Id
      • POBImpression

        POBImpression(String id, String adUnitId, boolean isRewardedAd, boolean isInterstitial)
        Constructor to be used for creating Impression object for the Rewarded Ad
        Parameters:
        id - Impression Id
        adUnitId - Ad unit Id
        isRewardedAd - true for identifying as Rewarded Ad
        isInterstitial - true for identifying as Interstitial Rewarded Ad
    • Method Detail

      • isInterstitial

         boolean isInterstitial()

        Returns true if this impression is configured for Interstitials ad, else return false

        Returns:

        true if interstitial is configured else false

      • setInterstitial

         void setInterstitial(boolean interstitial)

        Set true if the impression is configured for insterstitial

        Parameters:
        interstitial - true if the impression is configured for insterstitial, else false
      • isRewardedAd

         boolean isRewardedAd()

        Returns true if this impression is configured for Rewarded ad, else return false

        Returns:

        true if Rewarded is configured else false

      • isCtaOverlayEnabled

         boolean isCtaOverlayEnabled()

        Returns true if CTA overlay is enabled for this impression.

        Returns:

        true if CTA overlay is enabled, false otherwise

      • setCtaOverlayEnabled

         void setCtaOverlayEnabled(boolean ctaOverlayEnabled)

        Enables or disables CTA overlay for this impression. When enabled, CTA overlay will be included in the request regardless of ad placement type.

        Parameters:
        ctaOverlayEnabled - true to enable CTA overlay, false to disable
      • isMRAIDAppStatusEnabled

         boolean isMRAIDAppStatusEnabled()

        Returns true if MRAID app status is enabled for this impression.

      • setMRAIDAppStatusEnabled

         void setMRAIDAppStatusEnabled(boolean mraidAppStatusEnabled)

        Enables or disables MRAID app status signal for this impression. Currently it is enabled only for banner, MREC, interstitial and rewarded ad format

        Parameters:
        mraidAppStatusEnabled - true to enable MRAID app status, false to disable
      • setNative

         void setNative(@Nullable() POBNative pobNative)

        Sets the oRTB native object

        Parameters:
        pobNative - oRTB object for Native Ad
      • setGpid

         void setGpid(@NonNull() String gpid)

        Set the GPID for the impression. If not set, ad unit id will be used as GPID. global placement identifier (GPID) is a publisher-specified placement (tag) ID that is passed unchanged by all supply-side platforms (SSPs). Refer https://github.com/InteractiveAdvertisingBureau/openrtb/blob/main/extensions/community_extensions/gpid.md for more details.

        Parameters:
        gpid - GPID String
      • getId

        @NonNull() String getId()

        Returns the unique identifier of the impression.

        Returns:

        Impression ID.

      • getAdUnitId

        @NonNull() String getAdUnitId()

        Returns the unique identifier which represents an ad placement on the app screen. This is the one you defined while creating profile mappings on the OpenWrap dashboard.

        Returns:

        OpenWrap specific ad unit ID.

      • setPMZoneId

        @Deprecated() void setPMZoneId(@Nullable() String pmZoneId)

        Set the zone id. This parameter is used to pass a zone ID for reporting.

        Parameters:
        pmZoneId - zone id
      • setTestCreativeId

         void setTestCreativeId(@Nullable() String testCreativeId)

        This parameter is used to request a test creative.

        Parameters:
        testCreativeId - test creative id.
      • setCustomParam

         void setCustomParam(@Nullable() Map<String, List<String>> map)

        Adds custom key-value parameters in an Ad request. Multiple values against the same key can be passed in list.

        Parameters:
        map - map of key-value pair
      • setAdPosition

         void setAdPosition(@NonNull() POBRequest.AdPosition adPosition)

        Sets the fold placement of the ad to be served. Possible values are: ABOVE_THE_FOLD BELOW_THE_FOLD HEADER FOOTER SIDEBAR FULL_SCREEN

        Parameters:
        adPosition - Value of ad placement
      • canEnableMRAIDAppStatus

         static boolean canEnableMRAIDAppStatus(@NonNull() Context context)

        Checks if MRAID app status should be enabled based on device permissions. MRAID app status requires QUERY_ALL_PACKAGES permission on Android R (API 30) and above. On devices below Android R, this check always returns true.

        Parameters:
        context - The application context
        Returns:

        true if MRAID app status can be enabled, false otherwise